Executing a jquery effect on demand. Is it possible?

Posted by Chocol8 on Stack Overflow See other posts from Stack Overflow or by Chocol8
Published on 2011-03-12T15:58:27Z Indexed on 2011/03/12 16:10 UTC
Read the original article Hit count: 202

I was looking the Highlight effect of Jquery's. That effect is really the one i would like to add in my webpage.

By looking at the the source code, i noticed that the effect will be reproduced on user's click of the div.

$("div").click(function () {
      $(this).effect("highlight", {}, 3000);
});

In my webpage i have an ImageButton

<asp:ImageButton ID="btnFavorite" runat="server" ImageUrl="~/Images/Favorite.png"/>

I would love to perform the highlight effect to the div, when the user clicks on the image button. Is it possible?

UPDATE: If it is possible, could i use something like "OnClientClick=" of the ImageButton, since the imagebutton controls are added dynamically to the webpage?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery