Jquery实现控件的隐藏和显示实例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>jquery</title>
<script type="text/javascript" src="jquery-1[1].3.2.min.js"></script>
<style type="text/css">
.big{ font-size:30px; color:#FF0000;}
</style>
<script type="text/javascript">
$(function(){
$('#click_event').click(function(){
$('#click_event').html('');
if($('#hidden_enent').is(':hidden'))
{
$('#hidden_enent').show();
$('#click_event').html('隐藏');
}
else
{
$('#hidden_enent').hide();
$('#click_event').html('显示');
}
})
})
</script>
</head>
<body>
<div id="click_event" style="cursor:pointer">隐藏</div>
<div id="hidden_enent">测试隐藏</div>
</body>
</html>
相关文章
jquery缓动swing liner控制动画过程不同时刻的速度
一个用来控制动画过程的速度的参数,这就是缓动(easing),它确定了动画过程不同时刻的速度2014-05-05
jQuery移动端日期(datedropper)和时间(timedropper)选择器附源码下载
今天我给大家介绍一款非常有趣的日期和时间选择器,它分为日期选择器datedropper以及时间选择器timedropper,他们俩尤其适合在移动端上应用。感兴趣的小伙伴一起学习吧2016-04-04


最新评论