Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updates to sliders II

  • Loading branch information...
commit 4fab68a4baa8bee7216b790492fc083e07376fee 1 parent 570aeab
@addyosmani addyosmani authored
Showing with 4 additions and 14 deletions.
  1. +4 −14 demo/app.js
View
18 demo/app.js
@@ -64,9 +64,7 @@
$('.coverflowItem').removeClass('ui-selected');
$('.coverflowItem:eq(' + ($itemNumber) +')').addClass('ui-selected');
- //
-
-
+
}
@@ -210,20 +208,12 @@
skipTo(coverflowItem);
- //
+
var sliderVal2 = $("#slider-vertical").slider("value");
sliderVal2 += (delta*50);
-
$("#slider-vertical").slider("value", (sliderVal2));
- var topValue = -((100-sliderVal2)*difference/100);//calculate the content top from the slider position
-
- if (topValue>0) topValue = 0;//stop the content scrolling down too much
- if (Math.abs(topValue)>difference) topValue = (-1)*difference;//stop the content scrolling up too much
-
-
-
- $("#sortable").css({top: (coverflowItem * -25 ) });//move the content to the new position
-
+
+ $("#sortable").css({top: (coverflowItem * -25 ) });
event.preventDefault();//stop any default behaviour
Please sign in to comment.
Something went wrong with that request. Please try again.