Showing
2 changed files
with
23 additions
and
0 deletions
@@ -12,6 +12,8 @@ var $ = require('yoho-jquery'), // eslint-disable-line | @@ -12,6 +12,8 @@ var $ = require('yoho-jquery'), // eslint-disable-line | ||
12 | var $cartnewTips = $('.cartnew-tips'), | 12 | var $cartnewTips = $('.cartnew-tips'), |
13 | $cartListWrap = $('#Y_CartListWrap'); | 13 | $cartListWrap = $('#Y_CartListWrap'); |
14 | 14 | ||
15 | +require('../common/function') | ||
16 | + | ||
15 | // 关闭温馨提示 | 17 | // 关闭温馨提示 |
16 | $cartnewTips.find('.btn-close').click(function() { | 18 | $cartnewTips.find('.btn-close').click(function() { |
17 | $cartnewTips.fadeOut(); | 19 | $cartnewTips.fadeOut(); |
public/js/common/function.js
0 → 100644
1 | +/* eslint-disable */ | ||
2 | +if (!Function.prototype.bind) { | ||
3 | + Function.prototype.bind = function(oThis) { | ||
4 | + if (typeof this !== "function") { | ||
5 | + return; | ||
6 | + } | ||
7 | + | ||
8 | + var aArgs = Array.prototype.slice.call(arguments, 1), | ||
9 | + fToBind = this, | ||
10 | + fNOP = function() {}, | ||
11 | + fBound = function() { | ||
12 | + return fToBind.apply(this instanceof fNOP && oThis ? this: oThis, aArgs.concat(Array.prototype.slice.call(arguments))); | ||
13 | + }; | ||
14 | + | ||
15 | + fNOP.prototype = this.prototype; | ||
16 | + fBound.prototype = new fNOP(); | ||
17 | + | ||
18 | + return fBound; | ||
19 | + }; | ||
20 | +} | ||
21 | +/* eslint-ensable */ |
-
Please register or login to post a comment