91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

iframe自適應高度的插件

發布時間:2020-06-09 17:18:18 來源:網絡 閱讀:1301 作者:magicsa 欄目:web開發

項目地址:https://github.com/house9/jquery-iframe-auto-height


跨域無效!


用法:

jQuery('iframe').iframeAutoHeight(); 設置所有的iframe

$('iframe.photo').iframeAutoHeight();指定的iframe

<!-- with document ready, most likely in the html head --><script>  $(document).ready(function () {    $('iframe').iframeAutoHeight({debug: true});  });</script><!-- inline, after the iframe --><iframe src="my_iframe.html" class="auto-height" scrolling="no" frameborder="0"></iframe><script>  $('iframe.auto-height').iframeAutoHeight({minHeight: 240});</script>

選項:

  • callback: function

    • Default empty function

    • Optionally define a callback function (in this case inline) that will do something with the callbackObject.newFrameHeight value. This can for instance be used with easyXDM to alert another domain that the frame has changed height.

    • Example:$('iframe').iframeAutoHeight({callback: function(callbackObject) { alert(callbackObject.newFrameHeight);} });

    • you can also access the current iframe jquery wrapper object use the this keyword

    • for example:callback: function(callbackObject) { alert(callbackObject.newFrameHeight + " and the iframe href is:" + $(this).attr('src')); }


  • debug: boolean

    • Default is false

    • Will log some internal information to the console, if available

    • Example: $('iframe').iframeAutoHeight({debug: true})


  • heightOffset: integer

    • Default is 0

    • Unit is pixels

    • Optionally add some buffer to the bottom

    • Example: $('iframe').iframeAutoHeight({heightOffset: 20});


  • minHeight: integer

    • Default is 0

    • Unit is pixels

    • Sets the iframe height to this value if the calculated value is less

    • Example: $('iframe').iframeAutoHeight({minHeight: 200});


  • animate: boolean

    • Default is false

    • Uses jquery animate with duration of 500 when resizing the iframe

    • Example: $('iframe').iframeAutoHeight({animate: true});


  • resetToMinHeight: boolean

    • Default is false

    • hard set the iframe height to the minHeight before re-sizing


  • triggerFunctions: Array of functions

    • Default is an empty array

    • Optionally define 1 or more functions that will have access to the resize method

    • can be used to resize the iframe from external events such as click or window resize - see examples below


  • heightCalculationOverrides: Array of 2 element arrays

    • Default is an empty array

    • Optionally re-define the height calculation method(s)

    • override the default implementation or just override specific browsers

    • Example:$('iframe').iframeAutoHeight({strategyOverrides: [{ browser: 'mozilla', calculation: function () { return 2000; }}]);

    • The browser key should be one of 'webkit', 'mozilla', 'msie', 'opera' or 'default', seehttp://api.jquery.com/jQuery.browser/

    • The calculation key should be a function, usually with the signature(iframe, $iframeBody, options, browser)

    • see more examples below



上傳了壓縮包


附件:http://down.51cto.com/data/2363378
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

安顺市| 托里县| 藁城市| 桐乡市| 济宁市| 永泰县| 林甸县| 周至县| 九江市| 三原县| 富阳市| 南丹县| 阳泉市| 蚌埠市| 宜城市| 贺兰县| 永清县| 柳河县| 衡南县| 双桥区| 贡觉县| 资阳市| 夹江县| 忻城县| 巩义市| 溧水县| 论坛| 德昌县| 广安市| 英德市| 临江市| 乌鲁木齐市| 义乌市| 阿坝县| 满洲里市| 渭南市| 安徽省| 玉溪市| 张家口市| 南昌市| 钟山县|