From b916ea4aa0dd61d710c647202297697bc4be91b5 Mon Sep 17 00:00:00 2001 From: Penn Su Date: Thu, 7 May 2015 06:55:21 -0700 Subject: [PATCH] The wrong this The this in the call to refresh() from MutationObserver is the module itself not the DOM jquery object. Changing to element fixed it. --- src/definitions/modules/checkbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index b5f2b11d3..8cb3f1112 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -93,9 +93,9 @@ $.fn.checkbox = function(parameters) { }, refresh: function() { - $module = $(this); - $label = $(this).find(selector.label).first(); - $input = $(this).find(selector.input); + $module = $(element); + $label = $(element).find(selector.label).first(); + $input = $(element).find(selector.input); }, observeChanges: function() {