0

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?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
ConductedClever
  • 4,175
  • 2
  • 35
  • 69

0 Answers0