Dancer
Dancer

Reputation: 17701

Jquery Function Triggers

I'm struggling with something that I expect should be fairly straightforward! - is it possible to have more than one function trigger - for example in the below code img.swap triggers the event -

 $("ul.navigation img.swap").live("mouseover mouseout",
      function (event) {{);

Is it possible to add other triggers - for example if I had a different image class such as img.over could this be added in something similar to -

$("ul.navigation img.swap" & "img.over").live("mouseover mouseout",
      function (event) {});

Thanks paul

Upvotes: 0

Views: 80

Answers (1)

T. Stone
T. Stone

Reputation: 19495

Use a comma.

$("ul.navigation img.swap, img.over")

Upvotes: 1

Related Questions