English 中文(简体)
显示Wait形象
原标题:showing Wait image
  • 时间:2012-01-13 18:08:21
  •  标签:
  • jquery

I have the following HTML code

<li><div><..><input type="submit" ...></div></li>

i added a click event to the button to remove the Whole <li>. the process takes a while 1/2 second sometime. I wanted to include a message with a wait icon while processing removing I code the following code:

   var $li = $(btnRemove).closest( li ).empty();

    // Add Please wait
    var $logo = $( <img> ).attr( src ,  logo.gif );
    var $tblWait = $( <table /> ).append(
            $( <tr /> ).stop()
            .append($( <td/> ).append($logo))
            .append($( <td/> ).html(  Pleasee wait while removing table ))
            );
    $li.append($( <div/> ).append($tblWait));

..... Process and do other tack and finally
$li.remove();

如果一把小点一带,我就会看到标识和标识;如果电文没有破碎,则在1/2秒之后,电离层就会被拆除,但电 log不会打上。 我试图将图像上装在页面准备活动上,但标识实际上很小,没有时间装上。 任何帮助都将受到高度赞赏。

最佳回答

这是因为贾瓦伦古文的性质,而多瑙河则有着同样的线索。 一旦你们对人力部做出任何改变,能源部将不再停下来。 这一过程可能会看上去:

(idle) -> Event fires -> JavaScript code executes -> Repaint GUI -> (idle)

为了显示这一信息,你需要利用时间来拖延漫长的过程:

$li.append($( <div/> ).append($tblWait));

window.setTimeout(function () { 
    //... Process and do other tack and finally
    $li.remove();
}, 0);
问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签