Skip to content

Commit 1ca32b5

Browse files
committed
issues #14 - now returns this and the search is the same for selectors
1 parent 0a5ba80 commit 1ca32b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plugins/rangeSliderFox/rangeSliderFox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { NAME_PLUGIN } from '@shared/constants';
33
import { Controller, Model, View } from './mvc/controller/Controller';
44

55
$.fn.RangeSliderFox = function plugin(options = {}) {
6-
return this.each((i: number, element: Element) => {
6+
this.each((i: number, element: Element) => {
77
if (!$.data(element, NAME_PLUGIN)) {
8-
$.data(
9-
element,
8+
$(element).data(
109
NAME_PLUGIN,
1110
new Controller(new Model(options), new View(element)),
1211
);
1312
}
1413
});
14+
return this;
1515
};
1616

1717
const handleDocumentDOMContentLoaded = (event: Event) => {

0 commit comments

Comments
 (0)