How do I change the below javascript to change my css class, rather than add/append to it?
<script type="text/javascript">
(function($){
$(document).ready(function(){
$('ul#horizontal.nav.menu').addClass('myNewClass');
});
})(jQuery);
</script>
EDIT
I am trying to change the following UL:
<ul class="nav menu" id="horizontal">
to
<ul class="myclass" id="horizontal">
I have tried the following just before my closing </body>
tag and not working:
<script type="text/javascript">
(function($){
$(document).ready(function(){
// add items for bootstrap dropdown's
$("#horizontal").attr("class", "myclass");
})(jQuery);
</script>
tag & they don't work. I am trying to change
to
– user991830 Nov 01 '13 at 13:36