mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
slider: fixed IE issue when handles where initialized without defined left/top values
This commit is contained in:
parent
593cb1ffef
commit
658307ab8f
@ -204,8 +204,8 @@ $.widget("ui.slider", {
|
|||||||
updateRange: function() {
|
updateRange: function() {
|
||||||
var prop = this.options.axis == "vertical" ? "top" : "left";
|
var prop = this.options.axis == "vertical" ? "top" : "left";
|
||||||
var size = this.options.axis == "vertical" ? "height" : "width";
|
var size = this.options.axis == "vertical" ? "height" : "width";
|
||||||
this.rangeElement.css(prop, parseInt($(this.handle[0]).css(prop),10) + this.handleSize(0, this.options.axis == "vertical" ? "y" : "x")/2);
|
this.rangeElement.css(prop, (parseInt($(this.handle[0]).css(prop),10) || 0) + this.handleSize(0, this.options.axis == "vertical" ? "y" : "x")/2);
|
||||||
this.rangeElement.css(size, parseInt($(this.handle[1]).css(prop),10) - parseInt($(this.handle[0]).css(prop),10));
|
this.rangeElement.css(size, (parseInt($(this.handle[1]).css(prop),10) || 0) - (parseInt($(this.handle[0]).css(prop),10) || 0));
|
||||||
},
|
},
|
||||||
getRange: function() {
|
getRange: function() {
|
||||||
return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"),10), this.options.axis == "vertical" ? "y" : "x") : null;
|
return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"),10), this.options.axis == "vertical" ? "y" : "x") : null;
|
||||||
|
Loading…
Reference in New Issue
Block a user