Drupal.behaviors.my_ajax = function (context) {
$('#content-group-inner a').live('click', function (e) {
$('#content-group-inner a').addClass('my_ajax-processed');
var url = $(this).attr('href');
$('#content-region-inner').empty().html('<img src="ajax-loader.gif" style="margin-left:50%;"/>');
$('#content-region-inner').load(url,'ajax=1',function() {
Drupal.attachBehaviors('#content-region-inner');
});
return false;
});
};
just change $('selector').onvent
(function (){});
=> $('selector').live('onvent', function (e){});
Just using your code in to my demo site. and it's work perfectly fine. i think people should go through it.Thank you for sharing.
ReplyDeleteDrupal Web Development