Skip to content

Commit ade6a39

Browse files
committed
fix jquery data error
1 parent bf873cc commit ade6a39

5 files changed

+11
-11
lines changed

examples/js/jquery.sliphover.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jquery sliphover 1.1.4
2+
* jquery sliphover 1.1.5
33
* apply 2d/3d hover animation to images
44
*
55
* inspired by http://tympanus.net/TipsTricks/DirectionAwareHoverEffect/index2.html
@@ -308,11 +308,11 @@
308308
};
309309
SlipHover.constructor = SlipHover; //fix the prototype link
310310
$.fn.sliphover = function(options) {
311-
var entry = $.data(this, 'sliphover');
311+
var entry = this.data('sliphover');
312312
if (!entry) {
313313
entry = new SlipHover(this, options);
314314
entry._ini();
315-
$.data(this, 'sliphover', entry);
315+
this.data('sliphover',entry);
316316
} else {
317317
entry._ini(this, options);
318318
}

examples/js/jquery.sliphover.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jquery.sliphover.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jquery sliphover 1.1.4
2+
* jquery sliphover 1.1.5
33
* apply 2d/3d hover animation to images
44
*
55
* inspired by http://tympanus.net/TipsTricks/DirectionAwareHoverEffect/index2.html
@@ -308,11 +308,11 @@
308308
};
309309
SlipHover.constructor = SlipHover; //fix the prototype link
310310
$.fn.sliphover = function(options) {
311-
var entry = $.data(this, 'sliphover');
311+
var entry = this.data('sliphover');
312312
if (!entry) {
313313
entry = new SlipHover(this, options);
314314
entry._ini();
315-
$.data(this, 'sliphover', entry);
315+
this.data('sliphover',entry);
316316
} else {
317317
entry._ini(this, options);
318318
}

0 commit comments

Comments
 (0)