随笔分类 - jQuery
摘要:jQuery 插件开发模式 jQuery 的插件开发模式主要有三种: 通过$.extend()来扩展jQuery 通过$.fn向jQuery添加新的方法 通过$.widget()应用jQuery UI 的部件工厂方式创建 这里我们选用第二种: 因为这种方法是加在jQuery对象上,可以在jQuery
阅读全文
摘要:HTML Code: 步骤:1.在div内部前面插入一个span,并设置span背景及大小;2.再通过span向上滑动,露出底下的button的背景。CSS Code:#login_btn { margin-left:78px; margin-top:10px; background:url("./images/login_btn.png") left bottom no-repeat; width:184px; height:39px; overflow:hidden;}#login_btn button {border:none; background:url(&quo
阅读全文
摘要:JS Code:$('#checkAll').click(function() { //监听全选的点击事件 if($('#checkAll').attr('checked') == true) { //判断自身是否选中 $('#exportSelect input[type=checkbox]').attr('checked',true); //所有复选框设置为选中 } else {$('#exportSelect input').attr('checked',false); //所
阅读全文
摘要:JS Code:if($('.combo-p').is(":visible") == true){ alert("这是显示的");}else { alert("这是隐藏的");}jquery与visible相反的是隐藏hidden
阅读全文
摘要:原理简述:使用两个嵌套的两个DIV实现,外层DIV的宽度自己定义,内层DIV的宽度根据外层DIV的百分比定义,并设置背景颜色。再用jquery的animate方法实现内层DIV宽度从零开始增加。HTML Code:CSS Code: .partitionDiv {width:200px; height:66px; border:1px solid #999; background:url("./images/diskIcon.png") no-repeat left center; padding-left:64px; padding-right:5px; float:le
阅读全文

浙公网安备 33010602011771号