I'm looking for some tutorial to make an array data in custom jQuery Function, but I can't find any. Can you tell me how to make an array in jQuery Function? I want to call my function like this :
$(this).myPlugin({
data_first: '1'
data_second: 'Hello'
});
my function script
(function($) {
$.fn.myPlugin = function(data) {
return this.each(function() {
alert(data[data_first]+' bla bla '+ data[data_second]);
});
}
})(jQuery);