javascript - Removing just position attribute in jQuery -
i set code have traits:
the navigation items-texts- hidden behind divs i'll call them navigation divs
when mouse move on of pixels-navigation divs-, text behind this, slide right , left , in cases, of them move top , bottom 15 px animate() method...
when mouse move div, other text reset first position next action , did with:
$(document).on('mouseover', '.pixel#p18', function(){ $('.submenus').not("this div's text").fadeout('fast').removeattr('style'); });/* div's text example*/
and wrote kind of navigation texts..
now problem is:
when hover mouse on 1 of navigation divs, of texts did not animated, become visible because of removeattr('style')!!! don't want that...
is there alternative way can slide texts or other elements left, right, top , down optional values of move...??? example 23px left or 17px top... etc???- i'm familiyar slideup , down , toggle not sure enough code...
do have better idea this---that actualy you'll have because think bad
and last question why codes slow in running? animations wrote have lak times , i'm not sure problem selector or other stuff.
for need .animate has callback. like:
$('.submenus').not("this div's text").animate({opacity:0},500,'linear', function() { $(this).removeattr('style'); });
this remove attribute when animation complete.
Comments
Post a Comment