i dati li riesco a passare, ma ancora non riesco a renderli visibili fuori dall funzione questo è il codice
come faccio a rendere visibile questa variabile fuori dacodice:Lightbox.prototype.enable = function() { var self = this; $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { self.start($(event.currentTarget)); var divrel=$(this).attr('rel'); self.Popup(divrel); settingsvar=$(this).data('settings'); return false; });
Lightbox.prototype.enable = function() {
??
this.settingsvar=$(this).data('settings');
devo leggerla qui ma mi da undefined
codice:function Lightbox(options) { this.album = []; this.currentImageIndex = void 0; this.init(); alert(this.settingsvar); this.options = $.extend({}, this.settingsvar); this.option(options); }

Rispondi quotando