I've been building a plugin & I've been making good progress on it until today. And the issue involves using the jQuery tabs library on one of my plugin's admin pages.
I've got the following code in the plugin where the admin page is created:
add_action( 'admin_print_scripts', 'load_scripts' );
add_action( 'admin_print_styles' , 'load_styles' );
And here's load_scripts():
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'jquery-ui-core' );
wp_enqueue_script( 'jquery-ui-tabs' );
wp_enqueue_script( 'jquery-ui-datepicker', AS_URLPATH . 'js/ui.datepicker.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable' ) );
wp_enqueue_script( 'as_range-checks', AS_URLPATH . 'js/range-tests.js' );
The jQuery datepicker, which I had to download & include in my plugin, works fine. as_range-checks is a JavaScript library I'm writing & isn't involved in the problem.
Here's the JavaScript & the HTML on the page that generates the form for the admin page:
<script type="text/javascript" charset="utf8" >
jQuery(document).ready(function($) {
$("#tabs").tabs();
});
</script>
<div id="tabs">
<ul class="tabNavigation">
<li><a href="#tab1">Tab 1</a></li>
<li><a href="#tab2">Tab 2</a></li>
<li><a href="#tab3">Tab 3</a></li>
<li><a href="#tab4">Tab 4</a></li>
</ul>
. . .
The problem is that the content of all four tabs are displayed all of the time. Clicking on the tabs brings you to the right part, but nothing I've tried makes the content of the tabs that are supposed to be hidden actually disappear.
Does anybody have any ideas? I'm running WordPress MU 2.8.4a
Thanks
Tony