Div and Span labels display and hide divspan labels
In this example, you can learn about jQuery to display and hide the div or span tag on a webpage.
In the actual environment, it may be based on certain conditions. when the conditions are met, the rows of a div or span label are displayed and hidden.
It is mainly used to learn jQuery functions and syntaxes, and place a button on the webpage, so that users can click a bit to hide or display it. A div tag and a span tag are also placed.
In the asp.net mvc environment, create an Action in the control:
Next, create a view (mark 1 ):
Mark 2: Add a button on the webpage. The value is "hide", indicating that the current status of the button is show.
Mark 3 to add a div and a span tag.
Mark 4 to reference the jQuery class library.
Mark 5 and write jQuery Code, especially the click Event of the button:
Real-time Demonstration: