Created
April 7, 2014 10:16
-
-
Save jhouedanou/10017771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function(){ | |
// extra jQuery goodness for the Slider - March 15th 2012. | |
//jQuery('#myCarousel').fadeOut(); | |
jQuery('#myCarousel').fadeIn(); | |
/*carousel animation requested by the client*/ | |
$("#sup").click(function () { | |
$('#myCarousel').fadeIn().slideDown(''); | |
}); | |
$("#sdow").click(function () { | |
$('#myCarousel').fadeOut().slideUp(2000); | |
}); | |
$("#sup").mouseover(function () { | |
$.blockUI({ | |
message: '<h4>a la une / featured content</h4>', | |
timeout: 4000, | |
fadeIn: 700, | |
fadeOut: 700, | |
timeout: 2000, | |
showOverlay: true, | |
centerY: true, | |
centerX: true, | |
css: { | |
width: '350px', | |
top: '10%', | |
left: '5%', | |
right: '0%', | |
border: 'none', | |
padding: '5px', | |
backgroundColor: 'red', | |
'-webkit-border-radius': '10px', | |
'-moz-border-radius': '10px', | |
opacity: .6, | |
color: '#fff' | |
} | |
}); | |
}); | |
$("#sdow").mouseover(function () { | |
$.blockUI({ | |
message: '<h4>cacher le slider/hide the carousel</h4>', | |
timeout: 4000, | |
fadeIn: 700, | |
fadeOut: 700, | |
timeout: 2000, | |
showOverlay: true, | |
centerY: true, | |
centerX: true, | |
css: { | |
width: '350px', | |
top: '10%', | |
left: '5%', | |
right: '0%', | |
border: 'none', | |
padding: '5px', | |
backgroundColor: 'red', | |
'-webkit-border-radius': '10px', | |
'-moz-border-radius': '10px', | |
opacity: .6, | |
color: '#fff' | |
} | |
}); | |
}); | |
}); | |
//edit 25 decembre - prefetch pour la perf | |
var app = { | |
prefetchLinks: function(){ | |
var hrefs = $("a.prefetch").map(function(index, domElement){ | |
return $(this).attr("href"); | |
}); | |
return $.unique(hrefs); | |
}, | |
addPrefetchTags: function(){ | |
this.prefetchLinks().each(function(index,Element){ | |
$("<link />", { | |
rel: "prefetch", href: Element | |
}).appendTo("head"); | |
}); | |
}, | |
} | |
jQuery(function(){ | |
app.addPrefetchTags(); | |
}); | |
//april 5th edit : fixing that blood ) missing thingy | |
var aboveHeight = $('#header').outerHeight(); | |
$(window).scroll(function(){ | |
if ($(window).scrollTop() > aboveHeight){ | |
$('#toggler').fadeIn('fast'); | |
} else { | |
$('#toggler').fadeOut('fast'); | |
} | |
}); | |
//afficher le premier panneau | |
jQuery('#toggler').click(function(){ | |
jQuery('#myCarousel').slideToggle('slow'); | |
$.scrollTo(0,'slow'); | |
return false; | |
}); | |
jQuery('#nbwrapper').animate({marginBottom: '+=540px'}, 200); | |
//animation pour l'entete | |
jQuery('#fade').fadeIn(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment