English 中文(简体)
仅对一些请求使用“jaxStart”和“jaxStop jquery”方法
原标题:use ajaxStart and ajaxStop jquery methods only for some of requests
  • 时间:2011-01-25 06:25:30
  •  标签:
  • jquery
  • ajax

我利用AjaxStart和AjaxStop jquery方法在通过Ajax发出要求时展示和隐藏装货信息。 如以下法典:

                $( <div><img src="images/searching.gif" align="absmiddle" border="0" />Please Wait ...</div> )
            .attr( id , loading )
            .appendTo( body )
                .ajaxStart(function() { 
                  $(this).animate({
                        top     :  40px ,
                        opacity : 1.0
                   }, 500);
                })
                .ajaxStop( function(){ 
                  $(this).animate({
                       top     :  -75px ,
                       opacity : 0.1
                   }, 500);
                });

but I don t want this loading show for all requests and just show for some of specific request . are you have any Solution to the problem ?

问题回答

区分密码线,以制作你的载体图像,并约束亚克斯事件

区分需要麻省/瓦克斯塔特事件的图像和不需要打字的图像。 利用CSS课程区分图像。

a. 为亚克斯事件制作装货图像:

ajax:

$( <div><img src="images/searching.gif" align="absmiddle" border="0" />Please Wait ...</div> ).attr( id , loading ).attr( css , ajax-img ).appendTo( body )

(a) 满足以下条件:

$( <div><img src="images/searching.gif" align="absmiddle" border="0" />Please Wait ...</div> ).attr( id , loading ).appendTo( body )

a. bind子和ja球事件与 a球球球的图像相联

$( img.ajax-img ).ajaxStart(function() { 
                  $(this).animate({
                        top     :  40px ,
                        opacity : 1.0
                   }, 500);
                })
                .ajaxStop( function(){ 
                  $(this).animate({
                       top     :  -75px ,
                       opacity : 0.1
                   }, 500);
                });




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签