0

I have a div with a class id of .icon informationIcon. When I "mouseleave" i want the redNotesDiv(which is on the same page) to fade. Right now, this code does not trigger. I've looked at examples, and it seems as though it should work. What is the problem?

$(".icon informationIcon").bind("mouseleave", function () {
    redNotesDiv.fadeOut("slow", "linear")
});

ASPX. File

<div class="icon informationIcon" style="display: block;"></div>
jan86
  • 107
  • 2
  • 15

2 Answers2

0

Should with the following format when you want to select element with multiple classes:

$(".class1.class2.class3")

# your code should be
$(".icon.informationIcon").bind("mouseleave", function () {
    redNotesDiv.fadeOut("slow", "linear")
});
Fogmoon
  • 569
  • 5
  • 16
0
$(".icon.informationIcon").bind("mouseleave", function () {
    redNotesDiv.fadeOut("slow", "linear")
});

In the selector the classes should not have space and each class should have (dot.)operator

praveen
  • 489
  • 6
  • 12