內容簡介
這個shortcode:onloader,可以讓你在網頁上動態載入額外的內容,並在載入之前以一個漂亮的轉圈
當作載入指示器,直到內容載入完成。
用法
在文章或頁面的內容中加入如下的shortcode。
[onloader href="..." id="..." width="..." height="..." style="..."]
其中href屬性是必要的,其餘是可選的。
屬性描述如下:
href:要載入和顯示的內容的URL(或以“demo”開頭的字符串)。
id:用於在單個頁面上區分幾個其他相同的短碼。應該是一個以字母開頭的簡單文本字符串。
width:將容納載入指示器和載入完成後的內容的框的寬度,以CSS表示,例如:200px或100%。默認值為100%。
height:容納載入指示器和載入完成後的內容的框的高度,以CSS表示,例如:200px或100%。默認值為200px。
style:用於樣式化容納內容的框的CSS,例如:text-align: center; color: red。
範例
[onloader href="http://example.com/feed" id="example1" width="80%" height="15em" style="border: 1px solid blue"]
授權
版權所有(c)2009 Morten Høybye Frederiksen morten@wasab.dk
在任何情況下,都可以免費使用、複製、修改和分發此軟件,無論是否收取費用,前提是上述版權聲明和此許可聲明出現在所有副本中。
此軟件是「按原樣」提供的,作者拒絕所有關於這個軟件的任何隱含保證,包括所有適銷性和適合性的任何隱含保證。在任何情況下,作者都不承擔任何特殊、直接、間接或後果性損害或任何損失,無論是由於合同、過失或其他侵權行為引起,與使用或執行此軟件有關或相關。
外掛標籤
開發者團隊
原文外掛簡介
This shortcode, onloader, makes it possible to dynamically load extra content onto a page, with a nice spinning
load indicator taking the place of the content until it is loaded.
Usage
Add a shortcode like the following to the content of a post or page.
[onloader href="..." id="..." width="..." height="..." style="..."]
The href attribute is mandatory, the rest are optional.
Attribute descriptions:
href: The URL of the the content that should be loaded and displayed (or a string beginning with “demo”).
id: Used to differentiate between several otherwise identical shortcodes on a single page. Should be a simple
text string beginning with a letter.
width: The width of the box that will hold the load indicator and the content once it is loaded, expressed as
CSS, e.g. 200px or 100%. The default value is 100%.
height: The height of the box that will hold the load indicator and the content once it is loaded, expressed as
CSS, e.g. 200px or 100%. The default value is 200px.
style: CSS to style the box that holds the content, e.g. text-align: center; color: red.
Example
[onloader href="http://example.com/feed" id="example1" width="80%" height="15em" style="border: 1px solid blue"]
License
Copyright (c) 2009 Morten Høybye Frederiksen [email protected]
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
