jQuery slider not working in Wordpress plugin

Posted by Matt Facer on Stack Overflow See other posts from Stack Overflow or by Matt Facer
Published on 2010-06-14T11:30:24Z Indexed on 2010/06/14 11:32 UTC
Read the original article Hit count: 220

I've written a plugin for wordpress and I want to use a slider on my page. In it's most basic form (now) to test, I have the for the slider on my page

<div id="wpge-slider"></div>

then in the plugin, I have my init action

add_action('init', 'wpge_init' );

function wpge_init() {
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('wpge_search_results',  get_bloginfo('wpurl') . '/wp-content/plugins/myplugintest/js/wpge_search_results.js', array('jquery'), '1.0');
}

then in my own javascript page, I have

jQuery(document).ready(function($) {
    $("#wpge-slider").slider(); 
}); 

Everything (to me) looks ok, and the scripts ARE being called in the header. I can see them on the page... yet the slider is not showing. Can anyone see where I'm going wrong?!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery