Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your slider has a step value in it which specifically makes it NOT be fluid. The slider will only fire values in increments of your step. If you want to see smaller resize increments, then you will need to make the <code>step</code> value smaller. </p> <p>And, you have no animation going between sizes so the change from one size to the next will be jerky at best. If you want a smoother change from one size to the next, you can use jQuery animation to animate from one size to the next. Even this animation isn't guaranteed to be smooth (it depends upon the capabilities of the host computer), but it is more likely to be smooth.</p> <p>You can see a working example of that implementation with animation here: <a href="http://jsfiddle.net/jfriend00/eW53L/" rel="nofollow">http://jsfiddle.net/jfriend00/eW53L/</a></p> <p>The <code>resizing</code> flag you're using isn't helping you in any way. This piece of javascript is single threaded and not asynchronous so you won't get another slide callback until this one is done executing so the resizing flag doesn't actually accomplish anything.</p> <p>That code with the animation is here: </p> <pre><code>jQuery(document).ready(function() { var images = jQuery('.thumb-wrapper img'); //caches the query when dom is ready var CELL_WIDTH = 5; var ASPECT = 1.5; jQuery( "#slider" ).slider({ step: 5, min: 70, max: 200, value: 100, slide: function(event, ui) { var size = (CELL_WIDTH * ui.value / 100) + "em"; images.stop(true).animate({width: size * ASPECT, height: size}, 250); } }); });​ </code></pre> <p>If the images still won't animate size smoothly enough for you, then a work-around is to animate a border outline only (which animates with much less CPU) and then, when the user pauses moving the slider for some short time, you change the images to the new size of the border outline. This technique was often used in the days of less powerful computers.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload