I have a following scenario that I have to call a function on a jquery object dynamically. The code looks like this :
$('div[class]').each(function(){
var class=$(this).attr('class');
// I want to now check if that function with the name of class exists for jquery
// object. I need help here.
// if that function exists, i need to apply that function to the enumerated object.
});
I want to now check if that function with the name of class exists for jQuery object. I need help here. If that function exists, I need to apply that function to the enumerated object.
abcI want the functionabcto be executed, etc...jQuery.fn.function_here? Also, are you sure your elements will have only one class?