Loading jQuery plugin defaults from the server (AJAX)
- by Pablo
Im working on a private jQuery plugin in the following format:
(function( $ ){
var defaults = {};
$.fn.cmFlex = function(opts) {
this.each(function() {
//Element specific options
var o = $.extend({}, defaults, opts);
//Code here
});
//code Here
};
})( jQuery );
How will i go on loading the default options from the server before $.cmFlex() is first called?