I have the code
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})
});
This runs on firstload on the desired items. But the script may need to load new items with AJAX. What is the best way to run this code again after new items have been loaded?
Thanks.
Try using the ajaxComplete handler.
http://api.jquery.com/ajaxComplete/. It triggers when all AJAX calls are complete.