Loading jQuery plugin defaults from the server (AJAX)
Posted
by
Pablo
on Stack Overflow
See other posts from Stack Overflow
or by Pablo
Published on 2011-01-07T16:32:49Z
Indexed on
2011/01/07
16:53 UTC
Read the original article
Hit count: 250
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?
© Stack Overflow or respective owner