While working on a jQuery UI range slider, I was mainly debugging in chrome. I needed to make the range have a limit so I would grab the left position of one of the handles like so:
$el.css('left');
Which would give me the left position as a percentage: 84%
. However, when I tested in Firefox, it was returning the value in pixels.
Has anyone experienced this before? Based on looking at the DOM in Firebug, Firefox does recognize percent-based left positioning but it doesn't seem to return that as a value. Is this default behavior for Firefox? Is this the same in IE as well?
use $el.position().left;
instead :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With