Jump to content


Check out our Community Blogs

Bertan

Member Since 08 Sep 2010
Offline Last Active Jan 29 2012 06:54 AM
-----

Posts I've Made

In Topic: Show multiple count result from sql join

10 January 2012 - 10:08 AM

I got it working using DISTINCT inside the count, and yes that was a typo thanks for that :)

In Topic: Session cookies

06 January 2012 - 03:32 PM

More or less I was wondering about the necessity of storing session cookies from guests. It felt easier to just insert the session cookie to the database after the user logs in and if the user logs out remove it.

But as you said, guests come and go and have no need of this. So this means there is no reason to save session cookies for guests?

In Topic: Click event on DOM element inserted with AJAX

23 December 2011 - 02:26 AM

Nevermind got it working using live

In Topic: How to show and hide divs using JavaScript?

20 October 2011 - 08:06 AM

I have this now it works for the links, but what about the content that should be shown? It is just looping through the whole for loop making the last div always show no matter what link I click.

onload=function(){

	showContent();
	
	function showContent() {
		var texts = document.getElementsByClassName("text");
		var showTexts = document.getElementsByClassName("showText");
		var y = 0;

		for (var i = 0; i < showTexts.length; i++) {
			var showText = showTexts[i];
			
			var text = texts[i];
			text.style.display = "block";
			var firstTextHeight = text.offsetHeight;
			text.style.display = "none";
			
			showText.onclick = showCommments;	
		}

				
		function showCommments() {
			text.style.display = "block";
			var textHeight = text.offsetHeight;
			if (firstTextHeight < textHeight){
				slideUp();
			} else {
				slideDown();
			}
			
			function slideDown(){
				y++;
				if(y <= firstTextHeight){
					text.style.height = y + "px";
					setTimeout(slideDown, 1);
				}
				showText.innerHTML = "Hide";
			}
				
			function slideUp(){
				y--;
				if(y >= 0){
					text.style.height = y + "px";
					setTimeout(slideUp, 1);
				} else {
					showText.innerHTML = "Show";
					text.style.display = "none"; 
				}				
			}
		}		
	}
}

In Topic: somebody help please , CSS driving me crazy Loool

28 January 2011 - 02:32 PM

I never tried :after but I'm pretty sure they will be applied to the content of .clearfix:after which means only the "."

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download