fix 1143: remove references to $document (#1147)

This commit is contained in:
Sergey Khval 2017-02-04 00:14:32 +03:00 committed by Federico Zivolo
parent e0852fc254
commit 72003f7988
2 changed files with 8 additions and 6 deletions

3
.gitignore vendored
View File

@ -9,6 +9,9 @@ _site
docs/.jekyll-metadata
docs/dist
# IDE specific
.idea
*.log
.sass-cache
Thumbs.db

View File

@ -295,7 +295,6 @@
},
"init": function (options) {
this.options = $.extend({}, this.options, options);
var $document = $(document);
if ($.fn.ripples && this.options.ripples) {
this.ripples();
@ -320,27 +319,27 @@
if (document.arrive && this.options.arrive) {
if ($.fn.ripples && this.options.ripples) {
$document.arrive(this.options.withRipples, function () {
document.arrive(this.options.withRipples, function () {
$.material.ripples($(this));
});
}
if (this.options.input) {
$document.arrive(this.options.inputElements, function () {
document.arrive(this.options.inputElements, function () {
$.material.input($(this));
});
}
if (this.options.checkbox) {
$document.arrive(this.options.checkboxElements, function () {
document.arrive(this.options.checkboxElements, function () {
$.material.checkbox($(this));
});
}
if (this.options.radio) {
$document.arrive(this.options.radioElements, function () {
document.arrive(this.options.radioElements, function () {
$.material.radio($(this));
});
}
if (this.options.togglebutton) {
$document.arrive(this.options.togglebuttonElements, function () {
document.arrive(this.options.togglebuttonElements, function () {
$.material.togglebutton($(this));
});
}