Get jQuery property within a function -
just @ example. using jquery file upload
$('#button').fileupload({ url: 'upload.app', datatype: 'json', autoupload: false, sequentialuploads: true, add: function (e, data) { //access myoptions property here }, fail: function (e, data) { // , here }, done: function (e, data) { // , here } }).prop('myoptions', { opta: name, optb: 0 });
i wan't access myoptions property within callback methods add,fail , done. this.myoptions
defined fail , done callback. within add callback this.myoptions
undefined. there other way access myoption propety within callback methods?
assuming e actual event. it's possible contain element triggered event. try using firebug of chrome dev tools breakpoint on event want. can type debugger code want breakpoint. once breakpointed examine/watch e argument. contain e.target point element , access properties of element.
Comments
Post a Comment