Learn how to use jQuery at the Blog

Flayks Portfolio « visit

  • Added 7 months ago
  • 46 Lines of Code shown
  • 1 Links of Interest
http://flayks.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 Flayks Portfolio - http://flayks.com

// Screeshots creas
jQuery(function($){
	var settings = {
		thumbListId: "mini",
		imgViewerId: "screenshot",
		activeClass: "active",
		loaderTitle: "Chargement en cours",
		loaderImage: "../../img/ic/load.gif"
	};

	var thumbLinks = $("#"+settings.thumbListId).find("a"),
		firstThumbLink = thumbLinks.eq(0),
		loader = $(document.createElement("img")).attr({alt: settings.loaderTitle, title: settings.loaderTitle, src: settings.loaderImage}),
		highlight = function(elt){ thumbLinks.removeClass(settings.activeClass); elt.addClass(settings.activeClass); };
		highlight(firstThumbLink);
	var imgViewer = $("#"+settings.imgViewerId),
	    bigPic = imgViewer.children("img");
	thumbLinks.click(function(e){ e.preventDefault(); var $this = $(this), target = $this.attr("href"); if (bigPic.attr("src") == target) return; highlight($this); imgViewer.html(loader); bigPic.load(function(){ imgViewer.html($(this).fadeIn(400)); }).attr("src",target);});
});

$(document).ready(function(){
	// Fades
	$('#pages li a').hover(function(){ $(this).stop().animate({opacity:1}, 500); }, function(){ $(this).stop().fadeTo(1200, .7); });
	$('#news').hover(function(){ $(this).stop().animate({opacity:.7}, 500); }, function(){ $(this).stop().fadeTo(1200, .4); });

	// Menu
	$('#accueil').hover(function(){ $(this).stop().css({marginTop:'-33px', marginLeft:'-72px', height:'76px'}).animate({marginTop:'-55px', marginLeft:'-77px', marginRight:'5px', height:'98px'}, {queue:false, easing:'easeOutBack', duration:250}); }, function(){ $(this).stop().animate({marginTop:'-33px', marginLeft:'-72px', marginRight:'0', height:'76px'}, {queue:false, easing:'easeOutBounce', duration:500}); });
	$('#blog').hover(function(){ $(this).stop().css({marginTop:'-55px', marginLeft:'-15px', height:'98px'}).animate({marginTop:'-65px', marginLeft:'-15px', marginRight:'0px', height:'108px'}, {queue:false, easing:'easeOutBack', duration:250}); }, function(){ $(this).stop().animate({marginTop:'-55px', marginLeft:'-15px', marginRight:'0px', height:'98px'}, {queue:false, easing:'easeOutBounce', duration:500}); });
	$('#creas').hover(function(){ $(this).stop().css({marginTop:'-76px', marginLeft:'-34px', height:'119px'}).animate({marginTop:'-106px', marginLeft:'-32px', marginRight:'-2px', height:'149px'}, {queue:false, easing:'easeOutBack', duration:250}); }, function(){ $(this).stop().animate({marginTop:'-76px', marginLeft:'-34px', marginRight:'0px', height:'119px'}, {queue:false, easing:'easeOutBounce', duration:500}); });
	$('#galeries').hover(function(){ $(this).stop().css({marginTop:'-47px', marginLeft:'-31px', height:'90px'}).animate({marginTop:'-65px', marginLeft:'-29px', marginRight:'-2px', height:'108px'}, {queue:false, easing:'easeOutBack', duration:250}); }, function(){ $(this).stop().animate({marginTop:'-47px', marginLeft:'-31px', marginRight:'0px', height:'90px'}, {queue:false, easing:'easeOutBounce', duration:500}); });
	$('#contact').hover(function(){ $(this).stop().css({marginTop:'43px', marginLeft:'2px', height:'110px', width:'70px'}).animate({marginTop:'15px', marginLeft:'2px', marginRight:'0px', height:'140px', width:'100px'}, {queue:false, easing:'easeOutBack', duration:250}); },	function(){ $(this).stop().animate({marginTop:'43px', marginLeft:'2px', marginRight:'0px', width:'70px'}, {queue:false, easing:'easeOutBounce', duration:500}); });

	// Creas vignettes
	$('.crea big').css({top:'115px'});
	$('.web .crea a').removeAttr('title');
	$('.crea').hover(function(){ $(this).find("big:first").stop().animate({top:'73px'}, {queue:false, duration:180}); },
					 function(){ $(this).find("big:first").stop().animate({top:'115px'}, {queue:false, duration:600}); });

	// Liens _blank
	$(".out").attr("target","_blank");

	// Home
	$('#competences').hide();
	$('.competences').click(function(){ $("#competences").stop().slideToggle({duration:900, queue:false}); $(this).find('a').toggleClass('hover'); return false; });
	$('#lastcreas').easySlider({loop:true, speed:1500, autoplayDuration:6000});
});