jQuery selectmenu wordpress

admin

Administrator
Staff member
I am moving a site from normal php to wordpress and currently they use jquery-selectmenu plugin for their select menus.

I have tried to enqueu the script in wordpress head with no luck.

The scripts from the previous site look as follows.

Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<link rel="stylesheet" href="<?php echo $siteurl; ?>css/custom-theme/jquery-ui-1.8.1.custom.css" type="text/css" /> 
<script type="text/javascript" src="<?php echo $siteurl; ?>js/select-menu.js"></script>
<script type="text/javascript" src="<?php echo $siteurl; ?>js/init.js"></script>

<strong>init.js</strong> simply calls the function and works

Code:
$(function(){
    $('select#speedC').selectmenu({style:'dropdown'});
});

Now in Wordpress i added the following to my head.

Code:
&lt;link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'template_url' ); ?&gt;/custom-theme/jquery-ui-1.8.1.custom.css" /&gt;
&lt;link rel="pingback" href="&lt;?php bloginfo( 'pingback_url' ); ?&gt;" /&gt;

&lt;?php wp_enqueue_script( 'jquery-ui-core' ); ?&gt;
&lt;?php wp_enqueue_script( 'swfobject' ); ?&gt;
&lt;?php wp_enqueue_script( 'ui-core-select', get_bloginfo('template_directory') . '/js/select-menu.js' ); ?&gt;
&lt;?php wp_enqueue_script( 'jquery-pajinate', get_bloginfo('template_directory') . '/js/jquery.pajinate.js' ); ?&gt;
&lt;?php wp_enqueue_script( 'jquery-ui', get_bloginfo('template_directory') . '/js/jquery-ui.1.7.2.min.js' ); ?&gt;

And the script in my page

Code:
&lt;script type="text/javascript"&gt;
    $j=jQuery.noConflict();

    // Use jQuery via $j(...)
    $j(document).ready(function(){
        $j('select#speedC').selectmenu({style:'dropdown'});
    });
&lt;/script&gt;

Any ideas why it is not initiating?