I'm wring a jQuery plugin, and I want the divs created inside of the plugin can be customized the ids, which i mean:
this is what i've done:
(function($) {
$.fn.plugin = function (options) {
var defaults = {
box_id = "nos-box_id",
shoes_id = "nos-shoes_id"
}
...
...
...
return this;
})(jQuery);
and i want this:
(function($) {
$.fn.plugin = function (options) {
var defaults = {
plugin_prefix = "nos-",
box_id = _somethinghere_ + "box_id",
shoes_id = _somethinghere_ + "shoes_id"
}
...
...
...
return this;
})(jQuery);
to make "somethinghere" equals to defaults.plugin_prefix(in this case, "nos").
can anybody help me figure this out?
Thx !