I have two pages. One aspx page and the other an aspx page but it uses a master page. The tabber.js does not work with the page using the master page and I can’t figure out why. I found someone that suggested that the DOM does not load in time for the script to work. Although this was unrelated to tabber.js, I thought I would try it’s suggestions and it did not help. It basically suggested using jquery and adding script that would make the code run after the DOM has loaded.
When I put alerts throughout the tabber.js code, they popup and I get the proper amount of tabber divs but it will not render my tabs. Any ideas? Below is the head for the master page:
<head runat="server">
<link rel="stylesheet" type="text/css" href="css/fbcms.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
var tabberOptions = { manualStartup: true };
</script>
<script type="text/javascript" src="js/tabber.js"></script>
<script type="text/javascript" language="javascript">
$(function () {
tabberAutomaticOnLoad();
})
</script>
<script type="text/javascript">
$(document).ready(function () {
tabberAutomaticOnLoad();
});
</script>
<script type="text/javascript" src="js/suckerfish.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<!--[if IE]><script type="text/javascript" src="js/fix_eolas.js" defer="defer"> </script> <![endif]-->
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
Edit: Don’t look any further, I found the answer. Man in mirror is a complete bonehead. It’s 3AM and after debugging the tabber.js code, I found that I had improperly setup the tab structure. That’s what I get for working so late. Thanks to all who responded.
You don’t need to run the tabberAutomaticOnLoad() function twice. Use either block of code:
OR
$(function () {and$(document).ready(function () {do the same thing.