下载此文档

【选项卡jquery代码】jquery常用代码总结.docx


文档分类:IT计算机 | 页数:约1页 举报非法文档有奖
1/1
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/1 下载此文档
文档列表 文档介绍
该【【选项卡jquery代码】jquery常用代码总结 】是由【金】上传分享,文档一共【1】页,该文档可以免费在线阅读,需要了解更多关于【【选项卡jquery代码】jquery常用代码总结 】的内容,可以使用淘豆网的站内搜索功能,选择自己适合的文档,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此文档到您的设备,方便您编辑和打印。【选项卡jquery代码】jquery常用代码总结图片预加载:(function($){varcache=[];//Argumentsareimagepathsrelativetothecurrentpage.$.preLoadImages=function(){varargs_len=;for(vari=args_len;i--;){varcacheImage=("img");=arguments[i];(cacheImage);}}("","/path/to/");新窗口打开链接$("a[***@rel$="external"]").click(function(){="_blank";});/*Usage:*/平滑滚动$(document).ready(function(){$("").click(function(){$("html,body").animate({scrollTop:$($(this).attr("href")).offset().top+"px"},{duration:500,easing:"swing"});returnfalse;});});鼠标划入时渐入渐出$(document).ready(function(){$(".thumbsimg").fadeTo("slow",);//Thissetstheopacityofthethumbstofadedownto60%whenthepageloads$(".thumbsimg").hover(function(){$(this).fadeTo("slow",);//Thisshouldsettheopacityto100%onhover},function(){$(this).fadeTo("slow",);//Thisshouldsettheopacitybackto60%onmouseout});});等高的列varmax_height=0;$("").each(function(){if($(this).height()>max_height){max_height=$(this).height();}});$("").height(max_height);老版本浏览器html5支持(function(){if(!/*@[email protected]*/0)return;vare="abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(","),i=;while(i--){(e[i])}})()//然后在head中引入该js测试浏览器是否支持css3varsupports=(function(){vardiv=("div"),vendors="KhtmlMsOMozWebkit".split(""),len=;returnfunction(prop){if()returntrue;prop=(/^[a-z]/,function(val){();});while(len--){if(vendors[len]+){//browsersupportsbox-.//Oruseabang(!)totestifthebrowserdoesn";}}returnfalse;};})();if(supports("textShadow")){+="textShadow";取得url中的参数$.urlParam=function(name){varresults=newRegExp("[\\?&]"+name+"=([^&#]*)").exec();if(!results){return0;}returnresults[1]||0;}禁用回车提交表单$("#form").keypress(function(e){if(==13){returnfalse;}});

【选项卡jquery代码】jquery常用代码总结 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数1
  • 收藏数0 收藏
  • 顶次数0
  • 上传人
  • 文件大小10 KB
  • 时间2024-03-30