I am developing a plugin. But when i am calling the plugin then it says method is undefined
;(function($){
$.dialog = {
defaults : {
...
} //end of defaults
}; //end of $.dialog = {}
$.fn.extend({
dialog : function(userConfig) {
var config = (userConfig) ?$.extend({}, $.dialog.defaults, userConfig)
: $.dialog.defaults;
config.selector = "#" + this.attr("id");
$.dialog.createUI(config);
return this;
} //end of function(userConfig)
}); //end of $.fn.extend({})
..
})(jQuery);
And i am calling it like this
$(document).ready(function(){
$.dialog();
}); //end of $(document).ready(fn)
It says $.dialog is not a function. what am i doing wrong?
Thanks
I think you should use
instead of
if you want to call your plugin
instead of