| 參數或方法 | 名稱 | 說明 |
|---|---|---|
| 使用方法(開啟) | ||
| 使用方法(關閉) | $.unmybox() | |
| 方法 | $.mybox_isOpen() |
用來檢查光箱是否正在使用,回傳 true or false
|
| 參數 |
is_background_touch_close |
設定點外面背景時,光箱會不會消失,如:
// 點外面會消失 is_background_touch_close : true |
| 參數 |
message |
要顯示的內容,如:
message : "你好" 或是 message : $('#test').html() 或是 message : myAjax("https://3wa.tw/webservice/api.php?mode=test","") 參考 myAjax 程式碼如下:
function myAjax(url,postdata)
{
var tmp = $.ajax({
url: url,
type: "POST",
data: postdata,
async: false
}).responseText;
return tmp;
}
|
| 方法 | beforeBlock |
在開啟光箱前會作什麼事,如:
beforeBlock: function(){
alert('Hi~~~');
}
|
| 方法 | onBlock |
在開啟光箱完全開啟後作什麼事,如:
onBlock: function(){
alert("Hi~~~it's now opened.");
}
|
| 方法 | unBlock |
在關閉光箱之後作什麼事,如:
unBlock: function(){
alert("關掉後的Alert!!!");
}
|
* Fri Jan 12 2018 Feather Mountain <https://3wa.tw> 0.12
- Fix fullscreen scrollTop position
- Fix redefined beforeBlock, onblock, unBlock event issue.
* Mon Mar 13 2017 Feather Mountain <https://3wa.tw> 0.11
- Upgrade for jQuery 3.2.1 support.
- Fix dom.size() to dom.length
* Mon Mar 13 2017 Feather Mountain <https://3wa.tw> 0.10
- Fix scroll position.
* Sat Dec 24 2016 Feather Mountain <https://3wa.tw> 0.9
- Limit mybox width and height the window screen size 90%.
* Fri Nov 20 2015 Feather Mountain <https://3wa.tw> 0.8
- Fix window scrollTop after unmybox when is_background_touch_close equals true.
* Sun Aug 02 2015 Feather Mountain <https://3wa.tw> 0.7
- Fix window scrollTop after unmybox.
* Thu Jul 02 2015 Feather Mountain <https://3wa.tw> 0.6
- Remove jQuery version check in setup.
* Tue Jun 30 2015 Feather Mountain <https://3wa.tw> 0.5
- Add $.mybox_isOpen().
* Tue Jun 23 2015 Feather Mountain <https://3wa.tw> 0.4
- Fixed contents.
* Thu Nov 27 2014 Feather Mountain <https://3wa.tw> 0.3
- Fixed screen scroll issue.
* Wed Aug 27 2014 Feather Mountain <https://3wa.tw> 0.2
- Fixed screen center issue.
* Thu Feb 20 2014 Feather Mountain <https://3wa.tw> 0.1
- Building on first time.
$.unmybox();
或是 <input type='button' value='關閉' onClick="$.unmybox();">