jQuery tabs
-
I have the latest version of WordPress installed and am trying to get a simple jQuery tab system set up in a Page, to no avail. I’ve essentially taken the code from here and put it into my Page, as well as the header.php file.
Currently, I have the body code copied over word for word, with WPs automatic loading of jQuery. I’ve tried a lot of things, but haven’t been able to get it working. I read through this thread but haven’t been able to come up with any definite answers there, either.
So, I have:
<?php wp_enqueue_script('jquery-ui-core'); ?> <?php wp_enqueue_script('jquery-ui-tabs'); ?> <?php wp_head(); ?> <script type="text/javascript"> jQuery(document).ready(function($){ $(".tabs").tabs(); }); </script>With the following in the body:
<div id="tabs"> <ul> <li><a href="#fragment-1"><span>1</span></a></li> <li><a href="#fragment-2"><span>2</span></a></li> <li><a href="#fragment-3"><span>3</span></a></li> </ul> <div id="fragment-1"> 1 <div>If you can see this it works with DIVS</div> </div> <div id="fragment-2"> 2 </div> <div id="fragment-3"> 3 </div> </div>I’ve tried subtle variations of everything, but nothin’! What am I doing wrong?
Thanks for any help!
The topic ‘jQuery tabs’ is closed to new replies.