Hello everyon,
I have a small jQuery related task to complete, and keep failing to do so, unfortunately. I need to output the value of a custom defined variable, as follows:
$(document).ready(function()
{
$('#preFeature').siteFeature({
outputElementId: 'CustomSliderName',
});
return false;
});
Below is the code to replace the default value with the custom defined one:
(function ($) {
$.fn.siteFeature = function (b) {
var c = $.extend({}, $.fn.siteFeature.defaults, b);
return this.each(function (i) {
obj = $(this);
var a = {};
a.which = i;
createFeature(c, a);
customizeFeature(c, a);
eventFeature(c, a)
})
};
$.fn.siteFeature.defaults = {
outputElementId: 'siteFeature',
};
})(jQuery);
function siteFeatureAutoPlayer(a)
{
var defaultSliderId = jQuery.fn.siteFeature.defaults.outputElementId; // this defines the default ID, works well
var sliderID = [COLOR="#FF0000"]jQuery.fn.siteFeature.......outputElementId[/COLOR]; // need to fix this part
}
I can’t figure out how to call the outputElementId variable in a function outside the jQuery class (see the red highlighted text). Could someone tell me the right way to do it, that would be much appreciated, thanks!