Skip to content

Instantly share code, notes, and snippets.

@dincho
Created July 17, 2013 11:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dincho/6019770 to your computer and use it in GitHub Desktop.
Save dincho/6019770 to your computer and use it in GitHub Desktop.
@@ -400,6 +400,9 @@
return this.each(function () {
if (typeof options == 'string') {
+ //restore options state before public method calls
+ tagManagerOptions = obj.data('tagManager-options');
+
switch (options) {
case "empty":
empty();
@@ -531,6 +534,9 @@
} else if (tagManagerOptions.hiddenTagListId != null) {
prefill($('#' + tagManagerOptions.hiddenTagListId).val().split(baseDelimiter));
}
+
+ //store options state for further public method calls
+ obj.data('tagManager-options', tagManagerOptions);
});
}
})(jQuery);
@johnnyshields
Copy link

@dincho should we merge this into TagManager?

@dincho
Copy link
Author

dincho commented Jul 17, 2013

If you want so ...

@stary71
Copy link

stary71 commented Jul 30, 2013

Thank you so much! That's exactly what I needed.

@rtpHarry
Copy link

rtpHarry commented Aug 1, 2013

This has saved me, thanks Dincho!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment