jquery - How do I apply this javascript to the selected image? -
i have javascript applied webpage:
$(function() { $('img.gallery_left').mouseover(function(){ $('img.gallery_left').animate({ borderwidth: '10px', width: '750px', height: '500px', marginleft: '1px', zindex: '15'}, 'default'); }); $('img.gallery_left').mouseout(function(){ $('img.gallery_left').animate({ borderwidth: '4px', width: '300px', height: '200px', marginleft: '1px'}, 'default'); }); });
i have gallery_left class applied number of images , when hover on 1 of images, makes every single image class gallery_left increment in size, border, etc. how create only image beingness hovered on applied, or have create every single image it's own class? (which i'd rather not have do...)
p.s. i'm not fluent in javascript, (i'm surprised made far!!) heads if don't understand you're trying across.
within event handlers, replace $('img.gallery_left')
$(this)
, e.g.:
$('img.gallery_left').mouseover(function() { $(this).animate({...}); });
they impact specific element saw event, instead of entire class of elements.
javascript jquery class jquery-animate mouseover
No comments:
Post a Comment