Peace and Blessing be Upon us all.
Basically I have a div say:
<div class="divele" style="background: url("/image/bkimg.jpg") top center no-repeat;background-size:cover;"></div>
Then I have an upload button which the user can select an image from his/her computer and save it in the database. After the XHR response with file being saved. The server respond with the new image link the same as /image/bkimg.jpg
which this time the old image has replaced with the new uploaded one. Now I need the div to re-request the new image from the server. and this is what i'm doing:
var parts = result;
$('.divele').css({"background": "url("+parts+") top center no-repeat", "background-size": "cover"});
Don't really know why But this does not load the new image.
Much regards