当前位置: 首页 > news >正文

旅游网站哪个做的好wordpress支持pdf

旅游网站哪个做的好,wordpress支持pdf,什么是一学一做视频网站,html 网站 模板在实际开发中会遇到确实需要获取隐藏元素的宽高#xff0c;这儿所说的隐藏元素是display为none的元素。 可使用jQuery Actual Plugin插件来完成#xff0c;其源码如下#xff1a; ;( function ( $ ){$.fn.addBack $.fn.addBack || $.fn.andSelf;$.fn.extend({actual : fun…在实际开发中会遇到确实需要获取隐藏元素的宽高这儿所说的隐藏元素是display为none的元素。 可使用jQuery Actual Plugin插件来完成其源码如下 ;( function ( $ ){ $.fn.addBack $.fn.addBack || $.fn.andSelf; $.fn.extend({ actual : function ( method, options ){ // check if the jQuery method exist if( !this[ method ]){ throw $.actual The jQuery method method you called does not exist; } var defaults { absolute : false, clone : false, includeMargin : false, display : block }; var configs $.extend( defaults, options ); var $target this.eq( 0 ); var fix, restore; if( configs.clone true ){ fix function (){ var style position: absolute !important; top: -1000 !important; ; // this is useful with css3pie $target $target. clone(). attr( style, style ). appendTo( body ); }; restore function (){ // remove DOM element after getting the width $target.remove(); }; }else{ var tmp []; var style ; var $hidden; fix function (){ // get all hidden parents $hidden $target.parents().addBack().filter( :hidden ); style visibility: hidden !important; display: configs.display !important; ; if( configs.absolute true ) style position: absolute !important; ; // save the origin style props // set the hidden el css to be got the actual value later $hidden.each( function (){ // Save original style. If no style was set, attr() returns undefined var $this $( this ); var thisStyle $this.attr( style ); tmp.push( thisStyle ); // Retain as much of the original style as possible, if there is one $this.attr( style, thisStyle ? thisStyle ; style : style ); }); }; restore function (){ // restore origin style values $hidden.each( function ( i ){ var $this $( this ); var _tmp tmp[ i ]; if( _tmp undefined ){ $this.removeAttr( style ); }else{ $this.attr( style, _tmp ); } }); }; } fix(); // get the actual value with user specific methed // it can be width, height, outerWidth, innerWidth... etc // configs.includeMargin only works for outerWidth and outerHeight var actual /(outer)/.test( method ) ? $target[ method ]( configs.includeMargin ) : $target[ method ](); restore(); // IMPORTANT, this plugin only return the value of the first element return actual; } }); })(jQuery); 当然如果要支持模块化开发直接使用官网下载的文件即可源码也贴上 ;( function ( factory ) { if ( typeof define function define.amd ) { // AMD. Register module depending on jQuery using requirejs define. define( [jquery], factory ); } else { // No AMD. factory( jQuery ); } }( function ( $ ){ $.fn.addBack $.fn.addBack || $.fn.andSelf; $.fn.extend({ actual : function ( method, options ){ // check if the jQuery method exist if( !this[ method ]){ throw $.actual The jQuery method method you called does not exist; } var defaults { absolute : false, clone : false, includeMargin : false, display : block }; var configs $.extend( defaults, options ); var $target this.eq( 0 ); var fix, restore; if( configs.clone true ){ fix function (){ var style position: absolute !important; top: -1000 !important; ; // this is useful with css3pie $target $target. clone(). attr( style, style ). appendTo( body ); }; restore function (){ // remove DOM element after getting the width $target.remove(); }; }else{ var tmp []; var style ; var $hidden; fix function (){ // get all hidden parents $hidden $target.parents().addBack().filter( :hidden ); style visibility: hidden !important; display: configs.display !important; ; if( configs.absolute true ) style position: absolute !important; ; // save the origin style props // set the hidden el css to be got the actual value later $hidden.each( function (){ // Save original style. If no style was set, attr() returns undefined var $this $( this ); var thisStyle $this.attr( style ); tmp.push( thisStyle ); // Retain as much of the original style as possible, if there is one $this.attr( style, thisStyle ? thisStyle ; style : style ); }); }; restore function (){ // restore origin style values $hidden.each( function ( i ){ var $this $( this ); var _tmp tmp[ i ]; if( _tmp undefined ){ $this.removeAttr( style ); }else{ $this.attr( style, _tmp ); } }); }; } fix(); // get the actual value with user specific methed // it can be width, height, outerWidth, innerWidth... etc // configs.includeMargin only works for outerWidth and outerHeight var actual /(outer)/.test( method ) ? $target[ method ]( configs.includeMargin ) : $target[ method ](); restore(); // IMPORTANT, this plugin only return the value of the first element return actual; } }); })); 代码实例 //get hidden element actual width $(.hidden).actual(width); //get hidden element actual innerWidth $(.hidden).actual(innerWidth); //get hidden element actual outerWidth $(.hidden).actual(outerWidth); //get hidden element actual outerWidth and set the includeMargin argument $(.hidden).actual(outerWidth,{includeMargin:true}); //get hidden element actual height $(.hidden).actual(height); //get hidden element actual innerHeight $(.hidden).actual(innerHeight); //get hidden element actual outerHeight $(.hidden).actual(outerHeight); // get hidden element actual outerHeight and set the includeMargin argument $(.hidden).actual(outerHeight,{includeMargin:true}); //if the page jumps or blinks, pass a attribute { absolute : true } //be very careful, you might get a wrong result depends on how you makrup your html and css $(.hidden).actual(height,{absolute:true}); // if you use css3pie with a float element // for example a rounded corner navigation menu you can also try to pass a attribute { clone : true } // please see demo/css3pie in action $(.hidden).actual(width,{clone:true}); 插件地址http://dreamerslab.com/works 更多专业前端知识请上 【猿2048】www.mk2048.com
http://www.yutouwan.com/news/3599/

相关文章:

  • 网站无后台可以上框架如何建立本地网站
  • 泉州市建设网站wordpress收不到邮箱验证
  • 东莞做网站那家好客户管理crm系统哪家好
  • 企业网站建设方案论文天津市建设工程监理公司网站
  • 响应式企业网站设计与实现网站导航栏内容
  • 文明网站建设情况报告wordpress 邮件通知 密码
  • 工信部网站域名备案查询系统jsp 网站开发例子
  • 深圳北网站建设开发公司让员工顶名买房套取贷款
  • 烟台做网站推广的公司哪家好官网如何推广
  • 谈谈对电子商务网站建设的理解科技软件公司网站模板下载
  • qq网站推广代码建筑工程网库
  • 网站建设中所需条件有创意的文创产品
  • 做旅游宣传不错的网站网站建设开发报告论文
  • 建设企业网站企业网上银行助手下载网站标签怎么做
  • 微网站制作提供商推荐软件开发报价明细
  • 南宁网站建设找哪家开旗wordpress pdf缩略图
  • 卖房网站母亲节做什麽活动做网站的ui
  • iis中怎样配置网站绑定分析网站示例
  • 广东省建设厅投诉网站thinkphp cms开源系统
  • 中国移动网站建设建设合同网上备案上哪个网站
  • 聚财的公司名字大全肇庆网页关键词优化
  • 怎么自己做单页网站太原建设设计公司网站
  • 网站首页快照不更新装修流程先后顺序
  • 做网络教育录播网站自己想申请一个公司
  • 做网站的基本功百度网盘客户端下载
  • 青海省住房和城乡建设厅网站网站后台用什么浏览器
  • 网站站长 感受注册域名的网站有哪些
  • 网站开发培训太原wordpress企业官网主题下载
  • 建一个视频网站要多少钱枣庄网站建设
  • wordpress固定链接 404延安网站优化