I don't know if this could be a problem, you have a wrong jquery css function
in the submit function
here:
.on('submit', function (event, id, name, responseJSON) {
$('.qq-uploader').css({
'background': 'rgba(0,0,0,.3)'
}); //-------------------------^--------missing ')' closing here
.....// all other stuff
}).promise().done(function(){
$({
value: 75
}).animate({
value: 100
}, {
duration: 1000,
easing: 'swing',
step: function () {
$('.dial').val(Math.ceil(this.value)).trigger('change');
}
});
$('canvas').fadeOut();
var image = $('#profile-pic img').attr('src');
$('#profile-pic img').fadeOut(function () {
$(this).attr('src', image).fadeIn('slow')
});
});
You can try with .promise()
and .done()
functions.
From the docs:
done:
Type: Function( Promise animation, Boolean jumpedToEnd ) A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)