I'm currently writing a plugin and have run into and issue that, from searching stackoverflow, have an idea of what's wrong, but no clue how to code it.
The plugin is really long right now, so I've chopped out only the basics. The plugin works perfectly and loads all default settings for the first object. User settings override the defaults correctly. Everything works with 1 plugin call. As soon as another instance of the plugin is called, the only things that is logged are the settings passed in - all of the other defaults don't even show up.... From looking around I think I need to use the .data ? but I'm not sure and would rather know HOW and WHY this works rather than just copying and pasting code... so hopefully someone can help me out with a clear answer. Below is the trimmed code I have:
;(function($){
jQuery.fn.OnStage=function(options){
var defaults={ ... default settings ... },
o=$.extend(true, {}, defaults, options); return
this.each(function(){ ....
Thanks!