I've created a custom jQuery function and I want to call it for every match of an element on the page when it loads. The syntax I'm using to call the function:
$(document).ready(function() {
$("div.class1.class2").fixClassesForIE6("a","b");
});
That syntax does nothing. The fixClassesForIE6
function is never called.
I think I maybe need to use 'trigger' in some form? But I'm not entirely sure.
Ultimately, I want:
- the page to load
- find all DIV elements on the page with class1 and class2
- Trigger my function for each match