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
  • 51,252
  • 26
  • 196
  • 186
ConductedClever
  • 3,895
  • 2
  • 24
  • 63

0 Answers0