count:function() {
j = 0;
var allChildren = document.getElementById("samplesGroup").childNodes;
for (i = 0; i < allChildren.length; i++) {
if (allChildren[i].nodeType == 1)
if (allChildren[i].className.indexOf("samplesSection") >= 0) {
this.allGroups[j] = allChildren[i];
j++;
} //end if
} //end for
alert(this.allGroups.length);
}, //end count
getContent:function(section) {
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
When you click on "Click", it alerts you with how many divs with class "sampleSections" exist. Here's the problem: When it loads, just click "Click". It alerts 1 - valid. Then click "Category", AJAX refreshes, click "Click" and it alerts 2 - valid again. Click "Client", AJAX refreshes, and click alerts 3 - valid once more. However, whenever I click back on any of the other categories, it always alerts 3. I desperately need help on this. Any advice would be very much appreciated. Here is a live link, so you can test it out:
Bookmarks