diff options
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/miracles.min.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js index a4e32d9..57d2d60 100644 --- a/assets/js/miracles.min.js +++ b/assets/js/miracles.min.js @@ -161,12 +161,10 @@ function bodyScroll(event){ event.preventDefault();
}
function banScroll() {
- document.body.addEventListener('touchmove',bodyScroll,false);
- $('body').css({'position':'fixed',"width":"100%"});
+ $('html').css({'overflow':'hidden'});
}
function allowScroll() {
- document.body.removeEventListener('touchmove',bodyScroll,false);
- $("body").css({"position":"initial","height":"auto"});
+ $('html').css({'overflow':'auto'});
}
/**
@@ -288,9 +286,12 @@ function toggleDrawer() { /**
* Alert
*/
-function alertSend(content) {
+function alertSend(content,auto) {
$(".alert-content").text(content);
$(".alert").removeClass("ready");
+ if (auto===true) {
+ window.setTimeout(function(){$(".alert").addClass("ready");},3500);
+ }
}
function alertClose() {
$(".alert").addClass("ready");
@@ -302,7 +303,7 @@ function alertClose() { $(document).ready(function() {
$("body").bind({
copy : function(){
- alertSend("复制成功!若使用请注明原作者及原地址!");
+ alertSend("复制成功!若使用请注明原作者及原地址!",true);
}
});
});
@@ -338,7 +339,7 @@ L2Dwidget.init(config); * Load Pjax
*/
if(loadPjax = true) {
- $(document).pjax('a[href^="'+siteurl+'"]:not(a[target="_blank"], a[no-pjax], .comment-reply a, .cancel-comment-reply a)', {
+ $(document).pjax('a[href^="' + siteurl + '"]:not(a[target="_blank"], a[no-pjax], .comment-reply a, .cancel-comment-reply a)', {
container: '#pjax-container',fragment: '#pjax-container',timeout: 8000
}).on('pjax:send', function () {
GoTop();
|
