Return to Snippet

Revision: 53304
at November 18, 2011 13:05 by nickyangau


Initial Code
// back to top button
$(function() {
	$('#back_to_top').click(function() {
		$('body,html').animate({scrollTop:0},800);
	});
}); 

//menu fadein/fadeout anmiation.
$(function() {
	$('ul li ul', this).hide();
	var enterEvent = function() {
		$('ul', this).fadeIn();
};
	var leaveEvent = function() {
		$('ul', this).hide();
	};
	$('#nav ul li').hover(enterEvent, leaveEvent);
});

// gallery menu open a new window
$(document).ready(function(){
   $("#nav li.last").click(function(){
	 window.open('http://www.steveparishgallery.com');
	 return false;
	 });
});

Initial URL


Initial Description


Initial Title
some jQuery samples -- back to top / fadein fadeout menu / drupal menu open new window

Initial Tags
javascript, jquery, drupal

Initial Language
jQuery