I want to use jquery sliders in my plugin. In the main php file, I have the lines:
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-core');
before I enqueue my javascript. The javascript works and uses jQuery, but the slider does not. One of the sliders I want to make is:
<div id='height-slider' />
with the javascript:
jQuery("#height-slider").slider({
range: "min",
value: widgetHeight,
min: 150,
max: 1000,
slide: function(event, ui) {
document.getElementById('widgetHeight').value = ui.value;
}
});
where widgetHeight is a text input element, and widgetHeight is a variable already set. The problem is that the slider is never rendered. What am I doing wrong? Any help is appreciated.