Learn how to use jQuery at the Blog

45 Royale Inc. « visit

  • Added 11 months ago
  • 55 Lines of Code shown
  • 1 Links of Interest
http://45royale.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 45 Royale Inc. - http://45royale.com

// Start jQuery

$(document).ready(function() {

// GLOBALS //

/* Hover functionality site-wide **********************************************/
	
	$('.hover').hover(function() {
	  $(this).addClass('active');
	}, function() {
	  $(this).removeClass('active');
	});
	

/* Fade toggler ***************************************************************/

	$.fn.fadeToggle = function(speed) {
	   return this.animate({opacity: 'toggle'}, speed);
	};

/* Newsletter *****************************************************************/
	
	$('form#newsletter').hide();
	$('a.signup').click(function () {
		$('form#newsletter').fadeToggle(200);
		return false;
	});


}); // End jQuery


// Start jQuery

$(document).ready(function() {

// HOME SCRIPTS //

/* Recent work switcher *******************************************************/

	// Archive containers
	
	var imgContainers = $('div#recentimages > img');
	imgContainers.hide().filter(':first').show();
	
	$('ul.recentitems li a').click(function () {
		imgContainers.hide();
		imgContainers.filter(this.hash).fadeIn(800);
		$('ul.recentitems li a').removeClass('selected');
		$(this).addClass('selected');
		return false;
	});
	
}); // End jQuery