I struggle a little bit around to get the ui.slider plugin working.
I get managed it with the following code:

	jquery_ui_add('ui.slider');
	drupal_add_css(drupal_get_path('module', 'jquery_ui').'/jquery.ui/themes/base/ui.all.css');

I seems to me e little bit heavy-handed. Is there a better way to do it?

Comments

juhaniemi’s picture

I also couldn't get ui.slider to work without including css file with drupal_add_css(). I couln't find any documentation about this in the README.txt.

jmlane’s picture

I am also having some trouble with this. It would really great if we could get an example of working code that implements jQuery UI's Slider in Drupal. In fact, if someone were to post some instructions and code, I would be willing to write-up a book page for code snippets in a jQuery UI documentation section.

achton’s picture

Subscribing. Will attempt this for a project soon, and post results here.

sun’s picture

Title: Makes a JQuery Plugin like Slider and Co working » jquery_ui_add() does not add required CSS files
Component: Miscellaneous » Code
Category: support » bug
Issue tags: -jQuery
mghatiya’s picture

I also figured the same after breaking my head for 3 hours as to why the code was not working.

drewish’s picture

Status: Active » Closed (duplicate)

Duplicate of #388384: Allow usage of jQuery UI themes from the themeroller

I've got a github repo with a fix for this and some other issues that you might want to try out: http://github.com/drewish/jquery_ui

I'd love feedback if anyone has time to test it. The theme roller support is kind of broken right now but full themes should work. It's also compatible with jQuery 1.8.

charlie-s’s picture

Still experiencing this with latest version.