I have a partial view that contains an img like so:
And then in my view that contains it my javascript looks like this:
if ($(this).val() != '') {
setTimeout(function() {
$('#chartImage').attr("style", "")
}, 1);
}
If I don't put the timeout the image does not show. However, if I don't put the timeout and I put an alert prior to setting the attr the image appears. Kinda weird?
以上就是image shows only when debugging的详细内容,更多请关注web前端其它相关文章!