Is there any way to load google maps api from custom plugin before the
plugin codes executed?
I am developing a google map integrated plugin and i want that, let google
maps api v3 is loaded from my plugin before the plugin codes executed.
I tried to use $getscript but didn't work, i tried to put all codes into a
function (called initialize()) and execute this function when the plugin
activated but this time, my plugins' options are corrupted and i get
errors. I tried appendto() method but nothing changed.
I've searched many places to solve this issue, but no success..
Is there any proper way to solve this problem? thanks...
I am calling my plugin like that:
$('div#mapid').plugin_name({opt1:'val1',opt2:'val2',opt3:'val3'});
and my plugin is coded like that
(function($) {
$.fn.plugin_name = function( options ) {
var settings = $.extend(true,{
// default plugin options
}, options);
//plugin codes
}
}(jQuery));
No comments:
Post a Comment