Hello everyone, I'm having a problem executing a function, I have now tried different methods for hours and can't understand anything anymore.
Now when I execute the fuction infoApp(); in this function below, then it works.
function editCat(ids){ $('.mode').hide(); $('.editmode_'+ids).show(); $('.save_category_'+ids).click(function(){ var getThisName = $('.category_'+ids).val(); infoApp('cat_edit',getThisName); }); }
But when I try to execute the funtion automaticly then it does not work.Like this:
var getThisName = 'test value';infoApp('cat_edit',getThisName);
Here's the function
function infoApp(app,usedata){ $('.infomsg').show(); if(app == "cat_edit"){ $('.infomsg').text("Information, "+ usedata +" category was saved"); } $('.infomsg').fadeOut(3600); }
Hope anyone got some advice for me.Kris