jQuery element width for invisible element in IE will not give exact result.
But in Firefox it works perfectly.
$(e).width() //using jQuery to get the width.
i have used a way to solve this one by showing, calculate width and hiding the element.
$(e).
show(). // to get the width of visible element ==> IE issue
css({zoom: 1,left:$(e).position().left-parseInt($(e).width()),top:$(e).position().top}).
hide().
You want Ruby? We can do it! Hire us for Ruby on Rails, CoffeeScript, BackBone.js, MongoDb, _underscore.js,dojo,Extjs,jQuery,Node.js,LAMP, AJAX info {at} rubyassist {dot} com
Tuesday, September 28, 2010
jQuery animation effect slide bug in IE 7
The best example is for this ind of bug is presented by ryan as follows
http://www.ryancramer.com/misc/jquery_slide/#
the slide effects of jquery may not work 100% correctly in IE 6 & IE 7 . Effects are misbehave like effects complete till 50% or so...
So i have used show call back function to rescue the bug.. Though it is 100% not correct but once the effects renders second time it works perfectly.
So make it show and show it again..with less duration.. to avoid flickering effect.
$("my_element").show(1,function(){$(this).show("slide",{direction:"right"})})
http://www.ryancramer.com/misc/jquery_slide/#
the slide effects of jquery may not work 100% correctly in IE 6 & IE 7 . Effects are misbehave like effects complete till 50% or so...
So i have used show call back function to rescue the bug.. Though it is 100% not correct but once the effects renders second time it works perfectly.
So make it show and show it again..with less duration.. to avoid flickering effect.
$("my_element").show(1,function(){$(this).show("slide",{direction:"right"})})
Subscribe to:
Posts (Atom)