I am trying to add a class to a dynamically generated menu using jQuery. I am building the site on Business Catalyst so I do not have access to the server side code. I tried using the .addClass() method to add a class to my ul item. I am doing this because I am using Twitter Bootstrap and Business Catalyst generates ul menus with a unique id and not a class. The code I tried does not appear to add a class to the ul element in my menu. Any help would be appreciated.
Code:
<div class="navbar">
<div class="navbar-inner">
<div class="container">
{module_menu,14623}
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#nav_14623").addClass("nav");
});
</script>
Website URL: http://jshub.designangler.com/
your script code is being added before the jquery code is included you have to put your script code after it
Currenttly looks like:
Needs to be