IE not working? what's new...
I'm building a pretty standard jQuery plugin, using the structure:
-
(function($){
$.fn.myPlugin = function(options) {
...
};
$.fn.myPlugin.options = {
...
}
})(jQuery);
, where options are, well, options that can either be set through the function's parameters when the plugin is called or globally using the options object. Pretty normal, it's in all the tutorials. And it works perfectly in everything except... you guessed it... IE!
I'm not even getting past the first line:
-
<script ... include jQuery, myPlugin, etc></script>
<script type="text/javascript">
$(function(){
$.fn.myPlugin.options.option = "whatever";
$(something).myPlugin();
});
</script>
throws me the error
'$.fn.myPlugin.options' is null or not an object and point me to the
$.fn.myPlugin.options.option = "whatever"; line.
WTF?
Anybody know what's going on here?[/code]