How do I get the JQuery Slider (as a horizontal scrollbar) to start from the right??

Discussion in 'jQuery' started by Mojo1965, Nov 6, 2012.

  1. #1
    Hi All

    I know this might seem weird, but I'm using the JQuery UI slider to create a horizontal scrollbar of content.

    It works great, but I need it to load/display the far right of the content rather than the far left, eg:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14
    < scrollbar by default starts here

    1 2 3 4 5 6 7 8 9 10 11 12 13 14
    I need to start here >

    Basically I'm using the exact same JS, CSS and HTML from the JQuery UI Slider Scrollbar example code

    The only diff is that I've encapsulated the actual scrollbar content in an outer DIV as the whole thing is dynamically generated dependent on how many scroll-content-item's there are.

    In other words I have 5 links and if a user clicks on the 1st link then there will be 6 scroll-content-items.

    If they click on the 5th link then there will be 30 scroll-content-items.

    So that I don't have a big chunk of 'white space' **currently** to the right hand side of the scroll I dynamically throw the appropriate width at the JS, eg: scrollContent.css("width",scrollboxwidth+"px");

    Given that there appears to be tons more JS compared to the usual $("#slider") init line - is this right align requirement still possible?

    How does all of the margin-left stuff manage with this basic form of min/max/value??

    Sorry for being a newbie.

    Any pointers are appreciated.

    Thanks

    Mojo
     
    Last edited: Nov 6, 2012
    Mojo1965, Nov 6, 2012 IP