Learn how to use jQuery at the Blog

Creative Depart « visit

  • Added 11 months ago
  • 75 Lines of Code shown
  • 2 Links of Interest
http://creativedepart.com
This is my Source Code and I don't want to show it here
View Source Code only (as overlay)
// That code snippet belongs to Creative Depart - http://creativedepart.com

    	function handleLoad(){
    	    	
    		window.setTimeout(function() {
			offy = $('#allposts').offset().top;
			offx = $('#allposts').offset().left;
			arrange(); 
			}, 1);
			
			$('#allposts').fadeIn('slow');
						
			$('#header').animate({
      				height: '90px'
      			});
      		     		
    		$("div#expand").show();
			
			$('#expand').animate({
      				height: '25px'
      			});
      			
      		}
    	
      $(document).ready(function(){
      	 initEvents();
      	 $("div#expand").show();
      });
      
      function initEvents(event){
      	var showed = false;
      	
      	
      	$('.show').click(function(){
      		
      		if(!showed){
      			$('#header').animate({
      				height: '285px'
      			});
      			showed = true;
      			
    		$("div#contract").show();
      		$("div#expand").hide();

      		}else{
      			$('#header').animate({
      				height: '90px'
      			});
      			showed = false;
      		$("div#contract").hide();
      		$("div#expand").show();
      		}
      		      		
     	 });
      }



		$(function(){
			
			$(".box").jFade({
				trigger: "mouseover",
				property: 'background',
				start: '38322d',
				end: 'ffd53a',
				steps: 20,
				duration: 15
			}).jFade({
				trigger: "mouseout",
				property: 'background',
				start: 'ffd53a',
				end: '38322d',
				steps: 20,
				duration: 15
			});
			
		});