The navigation bar switch implemented by jQuery can be displayed and hidden, and the navigation bar of jquery can be displayed and hidden.
Use jQuery to implement navigation bar switching and display hiding. The main technologies used include slideToggle (), toggeClass (), and toggle ():
The Code is as follows:
<! DOCTYPE html>
:
JQuery enables switching and hide multiple li clicks
In this case, you 'd better paste your html code.
$ (Function () {$ ("# topnav li "). each ($ (this ). bind ("click", function () {$ (this ). siblings (). removeClass ("click "). children ("span" ).css ("display", "none"); $ (this ). addClass ("click "). children ("span" ).css ("display", "block") ;}); paste your html code.
JQuery: Why is the code for switching the display/hide effect invalid?
The sentence you called the change () function is incorrect. Parentheses are missing.
<Input id = "check" type = "button" onclick = "change ()" value = "Start detection..."/>