I’m attempting to place a jQuery accordion within a jQuery tab pane, and think there may be a conflict with the code I am using for the tabs as it is not appearing when inserted. The accordion works fine when in its own page. The script that appears in the page head is:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript" src="script/jquery.tools.min.js"></script>
<script type="text/javascript" src="v3flashslideshow/slideshow.js"></script>
<script type="text/javascript">
function goToByScroll(id){
$('html,body').stop().animate({scrollTop: $("#"+id).offset().top},'slow');
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
</script>
The script at the end of the page is:
<script>
$(function() {
$(".tabs:first").tabs(".css-panes:first > div", { history: true });
});
$(function() {
$("#accordion").tabs(
"#accordion div.pane",
{tabs: 'h2', effect: 'slide', initialIndex: null}
);
});
</script>
</body>
Can anyone see where I might be going wrong? I’m a total newbie to jQuery, and just can’t figure out where it is going wrong. The HTML all appears to be correct and can be viewed here.
Any help with this appreciated!!!
Why are you using jQuery UI and jQuery tools together? jQuery UI can do tabs and accordions and I know from personal experience that they work together. Also, remove the awful MM_ code which I assume was inserted automatically by dreamweaver 😉