jq hide show page

jq hide show page

To say

Knowledge of their own, who can take away the code comes from practice, if wrong, please leave a message, thank you for reading.

jq hide show page

Use div modify the page properties to change the page style: using jq syntax to change the style of the page;
the original page will be displayed style is set to display: none; change the page style syntax by jq

  1. Simple recording function , page layout I as follows:

1, html design

<div class="login_form">
   <!--html设计--!>
</div>

2, css styles

 .login_form{
 /*css样式*/
	display: none;
}

3, javascript codes

        
         //显示
		$(".login").click(function() {
			$(".login_form").css('display', 'block'); //表示设置为可用
			$(".cd-user").css("visibility","visible");
		});
		 //隐藏
         $(".cd-close-form").click(function(){
			$(".login_form").css('display', 'none'); //表示设置为可用
			$(".cd-user").css("visibility","hidden");
         });

Use visibility or the display can be changed to display hidden style;

Published 35 original articles · won praise 8 · views 20000 +

Guess you like

Origin blog.csdn.net/wenming111/article/details/90317962