Tag Archives: AWS

My js events are not calling after loading the page using AJAX

Whenever we are loading any data in DOM through AJAX, these data are not registered into the DOM that is why jQuery code written for any event like click, change, submit etc for any element, are not fired.
Solution:
By defining those events in jQuery on or live function we can solve this problem. But if we are using any contribute js files then it is not possible for us to go through the code and define all the event in on or live functions.
So now the question is how we can solve this problem?
Solution is reload the corresponding js file again.

Solution for some particular cases using the AWS plug-in:

BuddyPress activity pages don’t load correctly

a) Open file ajaxify.js
b) Search for “$body.removeClass(‘loading’);”
c) Paste the below code just before this line
scriptNode = document.createElement(‘script’);
contentNode.appendChild(scriptNode);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/rehabtabs/js/rehabtabs.packed.js?ver=3.3.2′);

Page breaking in case of using ‘rehabtabs’ wordpress plug-in

a) Open file ajaxify.js
b) Search for “$body.removeClass(‘loading’);”
c) Paste the below code just before this line
scriptNode = document.createElement('script');
contentNode.appendChild(scriptNode);
scriptNode.setAttribute('src', rootUrl + 'wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=20120110');