Codium
Codium

Reputation: 3240

jQuery UI 1.6 and adding slider in Drupal

I can't use new version of jQuery. I have 1.6.

I have in head ui.core, ui.slider, but when I call $('#min-price').slider(); I am getting:

$("#min-price").slider is not a function

I call it when DOM is ready.

Could somebody help?

code added

$(document).ready(function() {

    var wrapper = $('<span id="snuper-sorter-wrapper">Sort by: </span>'),
        dealsDivCopy = $('.view .views-row').clone(true),
        dealsCategories = $('#deals-categories'),
        currentDeals = Drupal.settings.snuper_filter.deals;


        $('#min-price').slider(); //here it fails
//rest of code

How can I examine that jquery ui object exists and get function list?

EDIT

My fault, I need to load it in different way.

In Drupal you add jQuery element this way:

jquery_ui_add(array('ui.slider'));      

Upvotes: 3

Views: 1080

Answers (1)

Bas Slagter
Bas Slagter

Reputation: 9929

Check if you have loaded both libraries (jQuery and the jQueryUI) and also make sure the paths to the files are correct.

Upvotes: 1

Related Questions