Jump to:

23460 Posts in 18907 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Coda-slider

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2125 Views
  • pound4pound
    Community Member
    2 Posts

    Coda-slider Link to this post

    What would I have to do to include a Javascript slider for featured work in SilverStripe? I have already looked through the forums and have found nothing. Sorry to ask such a question, I've just all ready tried a lot of things.

  • dalesaurus
    Community Member
    283 Posts

    Re: Coda-slider Link to this post

    I have done this with the jQuery Slider without much trouble.

    Read the docs here: http://docs.jquery.com/UI/Slider

    Drop this in your controller/form/whatever:

    Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery-packed.js');
    Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.core.js');
    Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.slider.js');

    Add an appriopriately ID'd <div id="myslider"></div> in your template, create and init the object in the myslider.js file:

       function() {
          // Prototype doesn't like $

          // Prep the slider
             'stepping': 1,
             'min': 1,
             'max': 100

    You should be off and running like a trademarked green tractor manufacturer's mascot.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.