OK so I have an element that is normally loaded no ajax, but then on click it reloads (along with other content) via ajax. no I cannot make the click elements non-ajax loaded on click.
Everything is working fine except I am doing the following on the .live click event:
$('.product-sort a.type-a').removeClass('active');
$(this).addClass('active');
Now the first time it works fine. but then the by the second/third time depending on the element I click, it doesn't just remove type-a it also removes the active class from type-b elements... I did console.log($('.product-sort a.type-a'))
and after ajax some of the elements are loading twice. Is the solution to just simply ajax load the nav to begin with so there isn't a predom/postdom elements? or is there another way around this?