I’m using this code to not only add a class to the first button link, but the others need to display the classification as well onclick. Unfortunately, the links do not ‘load’. You see a sample of it here. Scroll down and you’ll see four buttons “Trucks, Bodies, LIftgates, and Parts”.
The first one loads by default with the classification, as it should. The others load the class as well, but the pages don’t load! I’m confused as to ‘why’.
jQuery("#taxfil ul li:first-child").addClass("truck1");
jQuery("#taxfil li.truck1 a").addClass("chosen");
jQuery('#taxfil li a').on('click', function(e){
e.preventDefault();
jQuery('#taxfil li a.chosen').removeClass('chosen');
jQuery(this).addClass('chosen');
});