jquery - Multiple divs with same class name need individual operation -
i trying create effect involve panel expanding when appropriate link hovered. hover on link im using jquery change absolute position make slide have duplicates of same panel. how can code when each link highlighted activates slide own panel , not duplicates share same div classes. basicially need localise code run per each panel, each link activates slides
$(function(){ $(".expandlink").hover(function(){ $(".hiddencontent").stop(true, false).animate({ top: "110px" }, 150); }, function() { $(".hiddencontent").stop(true, false).animate({ top: "185px" }, 150); }); });
you have select find
this:
$(function(){ var allcontent = $('.hiddentcontent'); var stopanimation = function() { allcontent.stop(true, false); }; $(".expandlink").hover(function(){ stopanimation(); $(this).find(".hiddencontent").animate({ top: "110px" }, 150); }, function() { stopanimation(); $(this).find(".hiddencontent").animate({ top: "185px" }, 150); }); });
Comments
Post a Comment