The specific code is as follows:
//JS traversal add column class to add css and click other to delete css $(".radio-group .ckselect").each(function(index) { $(this).click(function() { var tagid=$(this).attr('tagid'); $("#tagid").val(tagid) $(".ckselect").removeClass("selected"); $(".ckselect").eq(index).addClass("selected") }) });
//JS click to display the close layer, and the blank area is also closed$(".zu-top-nav-userinfo").click(function(e) { if ($(".peoples").hasClass("allhide")) { $(".peoples").hide(); $(".peoples").removeClass("allhide"); return } (); $(".peoples").show(); $(".peoples").addClass("allhide") }); $(document).click(function() { if ($(".peoples").hasClass("allhide")) { $(".peoples").hide(); $(".peoples").removeClass("allhide") } });
Summarize
The above is the js traversal add column category and add css. Click on other to delete css. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!