Hello friends, I have the following code to show the image when the page loads when doing POST by means of a select:
this is the image:
<img src="img/icons/loader_transp.gif" width="20px" id="searchingimageDiv" class="img_loading" style="display:none">
this code of the select post:
$(document).ready(function(){
$("#Div2").change(function(){
$.ajax({
url:"../../../controllers/mi.php",
type: "POST",
data:"V="+$("#Div2").val(),
success: function(opciones){
$("#div_view").html(opciones);
}
})
});
});
this is the code to show the image:
$(window).load(function(){
$('#Div2').on("change", function(){
$('#searchingimageDiv').toggle();
});
});
The problem comes after doing the post, the image shows it, but it does not hide automatically when I finish loading the page, which I may be doing wrong, some suggestion
Thank you.