From 7a6edef11b744d2eb77454c7c3bcc40f56b22890 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Thu, 3 Nov 2016 15:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=8E=A7=E4=BB=B6=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E6=96=B9=E6=B3=95$.fn.extend=E5=86=99=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/Longbow.Common.js | 32 ++++++++------------ 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index 8cbc6604..1bd0dba0 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -78,21 +78,6 @@ } }); - $.fn.extend({ - "autoCenter": function () { - var that = this; - var getHeight = function () { - return ($(window).height() - $(that).outerHeight()) / 2 + $(document).scrollTop(); - } - $(window).resize(function () { - $(that).css({ - marginTop: getHeight() - }); - }); - that.animate({ marginTop: "+=" + getHeight() }); - } - }); - // enhance window.console.log if (!window.console) { window.console = { @@ -105,6 +90,18 @@ console.log || (console.log = opera.postError); $.fn.extend({ + autoCenter: function () { + var that = this; + var getHeight = function () { + return ($(window).height() - $(that).outerHeight()) / 2 + $(document).scrollTop(); + } + $(window).resize(function () { + $(that).css({ + marginTop: getHeight() + }); + }); + that.animate({ marginTop: "+=" + getHeight() }); + }, autoValidate: function (options) { // validate $(this).validate({ @@ -127,10 +124,7 @@ $(element).popover('show'); } }); - } - }); - - $.fn.extend({ + }, smartTable: function (options) { var settings = $.extend({ method: 'get', //请求方式(*)