简体   繁体   中英

Jquery, Ajax, BeforeSend and Show

I've already searched on other questions but I can't find a good solution. I use jQuery 1.11 to do an Ajax request. I want to show "caricamento7" (it's a <span> with an image and text) during the request and I punt .show() on BeforeSend but it doesn't work.

If I put alert("bye") it works!

Thank you for your help

$.ajax({
url : "calcolo.php",
type: "GET",
data : {
           dato1: $("#leva").val()
       }
cache: false,
crossDomain: false,
dataType : "json",
timeout: 3000,
beforeSend: function () {
    $("#caricamento7").show();
},
success: function(data) {...
dato1: $("#leva").val() //semicolon deleted

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM