Jump to content
  • 0

Добавление mousewheel.js к jQuery UI slider


Нарек
 Share

Question

Здравствуйте. Никак не могу решить проблему. Есть слайдер сделанный по такому принципу http://jqueryui.com/slider/#side-scroll

 

html 

<div class="ui-slide-range">    <div id="sliderContent">		        <div class="viewer ui-corner-all">            <div class="content-conveyor ui-helper-clearfix">                <div class="item">                    <img src="img/item4.jpg" height="152" width="205" alt="">		        </div>            </div>       </div>        <div id="slider"></div>    </div></div> 

js

$(function() {            //vars    var conveyor = $(".content-conveyor", $("#sliderContent")),    item = $(".item", $("#sliderContent"));        //set length of conveyor    conveyor.css("width", item.length * parseInt(item.css("width")));                //config        var sliderOpts = {      max: (item.length * parseInt(item.css("width"))) - parseInt($(".viewer", $("#sliderContent")).css("width")),          slide: function(e, ui) {             conveyor.css("left", "-" + ui.value + "px");          }        };        //create slider        $("#slider").slider(sliderOpts);      });$( "#slider" ).slider({                range: "min",                value: 1,                slide: function() {                    update();                }}); 

не хочет привязаться.. Может кто столкнулся с такой проблемой. Прошу помощи.

Edited by Нарек
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy