I have the following jQuery/JS setup. It works fine but I'm curious if there's a way to shorten it. I've tried a few different ways but I keep getting unassigned function errors. Is this just not possible yet?
switch(loadtype){
case 'html':
ajaxcon.html(ret);
break;
case 'prepend':
ajaxcon.prepend(ret);
break;
case 'append':
ajaxcon.append(ret);
break;
}
Is there a way that I could do this instead?
ajaxcon.loadtype(ret);