What you need to do is run this after the new content is added:
Code:
Nifty("div#nav20,div#nav21,div#nav22,div#nav23,div#nav24,div#nav25,div#nav26,div#nav27,div#nav28,div#nav29");
The way I've been using that has worked is to set up a polling function that tests for the existence of a unique id in the added content. I've found that to avoid a situation where the same content is added repeatedly, thereby 'fooling the poll', that this id must be removed prior to loading the new content, if it exist on the page. Add this function to a script block on your page:
Code:
function pollContent(id, state){
if (!document.getElementById)
return;
if (state&&state=='loading'&&document.getElementById(id)){
if (id=='nav29')
Nifty("div#nav20,div#nav21,div#nav22,div#nav23,div#nav24,div#nav25,div#nav26,div#nav27,div#nav28,div#nav29");
return;
}
else if (state&&state=='loading'&&!document.getElementById(id)){
setTimeout("pollContent('"+id+"', 'loading')", 60);
return;
}
else if (document.getElementById(id))
document.getElementById(id).id='';
}
And, where you have:
Code:
<a href="javascript:ajaxpage('you.html', 'rightcolumn'); loadobjs('layout.css', 'niftyCorners.css', 'NiftyLayout.css', 'niftycube.js', 'niftyLayout.js');" class="style11">How to SPARK it up!</a>
Change it to this:
Code:
<a href="javascript:pollContent('nav29');ajaxpage('you.html', 'rightcolumn'); loadobjs('layout.css', 'niftyCorners.css', 'NiftyLayout.css', 'niftycube.js', 'niftyLayout.js');pollContent('nav29', 'loading');" class="style11">How to SPARK it up!</a>
Notice that there are two calls to pollContent added in the above, one at the beginning of the javascript: href and one at the end. As explained, the first removes the polled for content's unique id if it exists and the second runs the code you have selected (red in the pollContent function) that is tailored to that content (the green test). You can use as many tests and actions in this part of the function as you need for other content but, this is all you need for the matter at hand.
Bookmarks