Thursday, June 28, 2007

Did AJAX At Work Now?

Original >>

I think it's very simple and useful short script. Jquery + CakePHP or any PHP page.

It's a AJAX Global Activity code:

$(function() {
var $headline = $('h1:first');
$(document).ajaxSend(function() {
$headline
.removeClass('activity')
.addClass('activity');
});
$(document).ajaxStop(function() {
$headline.removeClass('activity')
});
});

So. When ANY AJAX activity - your 'activity'-class will be work;-) Easy ;-)

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home