当前位置: 首页 > 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://wiki.neutronadmin.com/news/3599/

相关文章:

  • 宽创国际的展馆设计案例福州短视频seo推荐
  • 统计网站怎么做大连黄页企业名录
  • 小程序网站建设wordpress主题插件下载
  • 庆云网站seo做排行的网站
  • 免费海报模板网站域名已有服务器也有怎么做网站
  • 网站开发语言p网站商城功能模块
  • 网站主页制作教程站长工具查询
  • 湖南省城乡住房建设厅网站小说盗版网站怎么做的
  • 上海公司网站建设价格广东网络建设公司
  • 广东企业网站建设报价信息流广告公司
  • 崇明建设小学网站wordpress上传安装
  • 网站开发所需要的语言为wordpress创建一个ftp
  • 网站风格确定做网站 对方传销
  • 企业网站建设实训体会新余专业的企业网站建设公司
  • 网站刷新新前台是什么意思百度在线
  • 微楼书网站建设最新域名解析网站
  • 个人博客网站制作搭建如何在阿里云主机安装wordpress
  • 好的响应式网站做ppt用的音效网站
  • 企业网站建设方案 完整版上海外贸公司注册
  • 最好的网站制作公司手机怎么创网站免费
  • 学校网站建设的意义wix建站是免费的吗
  • h5手机模板网站衡阳网页定制
  • 大型网站seo方案怎样更新网站文章
  • 网站建设中可能出现的问题作文网高中
  • 网站商城建设公司关键词优化排名技术
  • 网站字体怎么修改网站开发的人李海涛
  • 响应式网站建设外文文献哪些网站是做设计的
  • 招聘网站建设方案模板下载河北建设工程交易信息网
  • 素材网站php程序源码做网站接广告赚钱吗
  • 网站改版建设原则京津冀协同发展规划纲要全文