I need a function to check whether a function in jQuery exists and if that's true this function should be called. If I use below code with an simple name it works, but if i want to check dynamically whether a function exists it doesn't work. Have anybody an idea?
function homeController() {
console.log('in the homecontroller');
}
$('div[class="view"]').each(function() {
$('#' + this.id).live('pageshow', function() {
var func = this.id + 'Controller';
if($.isFunction(func)) {
console.log('jquery exists');
}
});
});