For some reason my ajaxStop code is firing twice right now and I need to limit it to just one time.
$('.submit').bind('click', function(e) {
$("#fileupload").ajaxForm({
target: '#status'
}).submit();
$(document).ajaxStop(function() {
var mysrc = $("#status").find('img').attr("src");
$(".empty:first").removeClass("empty").removeClass("ui-state-default").addClass("ui-state").append('<img src="'+mysrc+'" width="45" height="60" class="expand"/>');
});
});
try using .one(), like:
$(document).one("ajaxStop", function() {
var mysrc = $("#status").find('img').attr("src");
$(".empty:first").removeClass("empty").removeClass("ui-state-default").addClass("ui-state").append('<img src="'+mysrc+'" width="45" height="60" class="expand"/>');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With