My question is related to this one: jQuery same click event for multiple elements
However, when I do:
$('.class1, .class2').click(function() {
some_function();
});
I always use the same function with the same object. What if I wanted to consolidate the following two statements for instance:
$(".class1").click(function () {
$(".classer1").slideToggle("slow");
});
$(".class2").click(function () {
$(".classer2").slideToggle("slow");
});
They reference a different object for each - can I even consolidate this?
Thanks, Oliver