Basically I have a standard imagesLoaded implementation. I want to know how can I manipulate a pre-existing variable within .done(). So basically something like this:
var p = 0;
$('#container').imagesLoaded().done( function( instance ) {
//manipulate p variable
});
console.log(p);
However, p never seems to change. Also, I am using React and therefore the rendering cycles of React may complicate things? I am still kind of new to React so I am unsure if React is causing my issues or if I am just using this deferred object wrong. I appreciate any feedback. Thanks.