Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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


Go to End

2 Posts   2627 Views


Community Member, 2 Posts

23 September 2009 at 10:51am

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.


Community Member, 283 Posts

23 September 2009 at 2:55pm

Edited: 23/09/2009 2:59pm

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

Read the docs here:

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.