I am moving the site from regular php to wordpress, and they are currently using the jquery-selectmenu plugin for their favorite menus.
I tried enqueu script in wordpress with no luck head.
The scripts from the previous site are as follows.
<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>
init.js just calls the function and works
$(function(){ $('select#speedC').selectmenu({style:'dropdown'}); });
Now in Wordpress I have added the following to my head.
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'template_url' ); ?>/custom-theme/jquery-ui-1.8.1.custom.css" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <?php wp_enqueue_script( 'jquery-ui-core' ); ?> <?php wp_enqueue_script( 'swfobject' ); ?> <?php wp_enqueue_script( 'ui-core-select', get_bloginfo('template_directory') . '/js/select-menu.js' ); ?> <?php wp_enqueue_script( 'jquery-pajinate', get_bloginfo('template_directory') . '/js/jquery.pajinate.js' ); ?> <?php wp_enqueue_script( 'jquery-ui', get_bloginfo('template_directory') . '/js/jquery-ui.1.7.2.min.js' ); ?>
And the script on my page
<script type="text/javascript"> $j=jQuery.noConflict(); // Use jQuery via $j(...) $j(document).ready(function(){ $j('select#speedC').selectmenu({style:'dropdown'}); }); </script>
Any ideas why it is not triggered?
ApPeL source share