if ($("#slider").length > 0) {
var positionSliderLabel = function () {
var sliderHelp = $this.view.find('.slider');
+ var span = $(sliderHelp).find('span');
var sliderCursor = $('#slidercursor .visible');
+ var bottom = Math.round(hh - sliderCursor.offset().top);
+ var left = Math.round(sliderCursor.offset().left + (sliderCursor.width() / 2));
+ var spanTop=-8;
+ var spanLeft=0;
+ var diff=($(span).width() + left) - ($this.fluidbook.resize.ww-10);
+ var height=null;
+ if (diff>0) {
+ spanLeft=-diff;
+ spanTop=-25;
+ height=0;
+ }
+
sliderHelp.css({
- bottom: Math.round(hh - sliderCursor.offset().top),
- left: Math.round(sliderCursor.offset().left + (sliderCursor.width() / 2)),
+ bottom: bottom,
+ left: left,
+ height:height,
transformOrigin: 'left bottom'
});
+ $(span).css({
+ top:spanTop,
+ left:spanLeft,
+ });
};
positionSliderLabel(); // Run immediately
setTimeout(positionSliderLabel, 250); // delay slightly to make sure co-ordinates are correct