defines an onclick, that works in both Edge and chrome, but Firefox gg, just self-taught the front end of the web page, but also look forward to your advice, thank you!
</i>
</div>
function searchToggle() {
if(main.hasClass("search-open")) {
main.removeClass("search-open");
$(".search-input").val("");
$("-sharplocal-search-result").empty();
} else {
main.addClass("search-open");
$(".search-input").val("");
$("-sharplocal-search-result").empty();
scrollTo(0,0);
}
}
the original method name is sidebarToggle ()
. I thought it was the reason for the method name, and then changed it. I also tried to put the js directly behind the element, but it didn"t work, because I thought about it all alone, so I didn"t write the specification. I hope the seniors can give me some advice.