Trinidad + jQuery
After a Trinidad Ajax call (PPR), DOM will change and jQuery non "bind" again on html controls. I use this script to fix this issue.
jQuery(document).ready(function () {
var requestQueue = TrPage.getInstance().getRequestQueue();
requestQueue.addStateChangeListener(myCallbackEnd);
addWidget();
});
function addWidget() {
// ADD HERE YOUR jQuery CODE (plugin and other)
}
function myCallbackEnd(state)
{
var busy = state == TrRequestQueue.STATE_BUSY;
// var div = document.getElementById("load");
// div.style.display = busy ? "inline" : "none";
if (!busy) {
// alert("changesToDom=" + changesToDom);
addWidget();
}
}
Commenti
I just came across this post, when trying to integrate jQuery and Trinidad and encountering the same problem. It appears as if you didn't post the script in question. I know this post is quite old, but do you have the script available? I am struggling! Thank you in advance.