How to use jquery for this scenario? -
I have a scenario - I am displaying a list of product names in the form of a list. REQUIRED I need to display the image of the product (the image is hidden). Html is the same (dynamically Prod 1, Prod 2 etc.)
You can use If you can, then give the link a general class so that you can do it like this ... But if you can not change the html, you can do it, .show ()
and .
$ ('.prod'). Hover (function {$ (.h) .next ('hidden'). Show ();}, function {$ (this) .next ('hidden'). Hide ();});
function over () {$ (this) .next ( '.hidden') Show ().; } Function Out () {$ (this) .next ('Hidden') Hide (); } $ ('# Prod1, # prod2'). Hover (over, out); // It will show on mouseover and hide on mouseover //, but if you just want to show it and do not want it to hide $ ('# prod1, # prod2'). Hover (over);
Comments
Post a Comment