English 中文(简体)
AJAX 装载后每升一次
原标题:Rerun jQuery each after AJAX load
  • 时间:2012-01-13 21:59:20
  •  标签:
  • jquery
  • ajax

我有这部法典。

var expired_overlay=$( .expired-overlay );

expired_overlay.each(function(){
var t=$(this),
    p=$(this).closest( .coupon ),
    ph=p.height()+ ((p.css( padding-top ).replace("px", ""))*2);
t.css({ width :p.width(), height :ph, opacity :0.5})

});

这先载在预期物品上。 但是,文字可能需要装上AJAX的新物品。 在新项目装满后再再实施该守则的最佳途径是什么?

感谢。

最佳回答

Try using the ajaxComplete handler.

http://api.jquery.com/ajaxComplete/。 它触发了美国宇宙航空研究开发机构的所有呼吁全部完成的情况。

$( .log ).ajaxComplete(function() {
  SpecialFunction();
});

SpecialFunction() {
  var expired_overlay=$( .expired-overlay );

  expired_overlay.each(function(){
  var t=$(this),
    p=$(this).closest( .coupon ),
    ph=p.height()+ ((p.css( padding-top ).replace("px", ""))*2);
  t.css({ width :p.width(), height :ph, opacity :0.5})

  });
}
问题回答

暂无回答




相关问题
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 ...

热门标签