First see the code below:
$(document).ready(function (e) {
var textToShow = "";
for (var i = 0; i < 2; i++) {
$("." + wholeEditableClasses[i]).mousedown(function (e) {
if (e.which == 3) {
$(".whichClass").html(/*what to use here*/);
$(".themeOptionsMenu").toggle(1000);
}
});
}
});
I want to add a mousedown event handler to some not preknown classes. I mean I have a list of classes and I want add this handler to them. In the handler's function I need to access the caller's class. How can I do this?