I have some thing like this:
$.ajax({
type: 'GET',
url: my_url,
success: function(data) {
$('#some_div').data('test', 'This is a test');
}
});
Then outside of the success callback, I tried to access my test variable like
console.debug($('#some_div').data('test'));
But this returns undefined
Any help please
Thank you