css - jQuery - only active menu item will change -
i'm beginner jquery , change background color active menu item , don't know how. if select item background change if select item, in item stay still "active background color" , want change default color , active menu item changed.
this static menu rebuilt dynamic menu database can use id or unique each menu item.
i have because , don't know how next:
$('#accordian h3').click(function () { $(this).addclass("active1") });
complete source here http://jsfiddle.net/berrf/. answer in jsfiddle best. advance.
add:
$("#accordion h3").removeclass("active1");
you can see @ fiddle. don't need 2 click events, can combine them.
you have remove active1 classes every h3 before setting again, current active have white background colour.
it's clear or questions? :)
Comments
Post a Comment