first commit
This commit is contained in:
74
site.js
Normal file
74
site.js
Normal file
@@ -0,0 +1,74 @@
|
||||
// Menu effects
|
||||
|
||||
jQuery(document).scroll(function() {
|
||||
var y = jQuery(this).scrollTop();
|
||||
|
||||
if (y > 100) {
|
||||
jQuery('.front .navbar').removeClass('bg-transparent').addClass('bg-white');
|
||||
jQuery('.front .navbar-brand').removeClass('d-none');
|
||||
} else {
|
||||
jQuery('.front .navbar').removeClass('bg-white').addClass('bg-transparent');
|
||||
}
|
||||
});
|
||||
|
||||
// Frontpage effects
|
||||
|
||||
jQuery(document).scroll(function() {
|
||||
var y = jQuery(this).scrollTop();
|
||||
|
||||
if (y > 500) {
|
||||
jQuery('#section-1-bis').addClass('pt-150');
|
||||
} else {
|
||||
jQuery('#section-1-bis').removeClass('pt-150');
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
var scrollDown = $(".scrolldown-1"),
|
||||
topElementHeight = 0,
|
||||
elementItems = scrollDown.find("a"),
|
||||
scrollItems = elementItems.map(function(){
|
||||
var item = $($(this).attr("href"));
|
||||
if (item.length) { return item; }
|
||||
});
|
||||
|
||||
elementItems.click(function(e){
|
||||
var href = $(this).attr("href"),
|
||||
offsetTop = href === "#" ? 0 : $(href).offset().top-topElementHeight+1;
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: offsetTop
|
||||
}, 600);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('.carousel').carousel()
|
||||
|
||||
$('.embed-responsive iframe').addClass('embed-responsive-item')
|
||||
|
||||
// Calcular ancho columnas carrousel portada
|
||||
//~ var colwidth = $( window ).width();
|
||||
//~ if (colwidth <= 414) {
|
||||
//~ $('#projectsSliderXs').removeClass('d-none');
|
||||
//~ $('#projectsSliderMd').addClass('d-none');
|
||||
//~ $('#projectsSliderLg').addClass('d-none');
|
||||
//~ $('#frontpage-actualidad-xs').removeClass('d-none');
|
||||
//~ $('#frontpage-actualidad-md').addClass('d-none');
|
||||
//~ $('#frontpage-actualidad-lg').addClass('d-none');
|
||||
//~ } else if (colwidth <= 1024) {
|
||||
//~ $('#projectsSliderXs').addClass('d-none');
|
||||
//~ $('#projectsSliderMd').removeClass('d-none');
|
||||
//~ $('#projectsSliderLg').addClass('d-none');
|
||||
//~ $('#frontpage-actualidad-xs').addClass('d-none');
|
||||
//~ $('#frontpage-actualidad-md').removeClass('d-none');
|
||||
//~ $('#frontpage-actualidad-lg').addClass('d-none');
|
||||
//~ } else {
|
||||
//~ $('#projectsSliderXs').addClass('d-none');
|
||||
//~ $('#projectsSliderMd').addClass('d-none');
|
||||
//~ $('#projectsSliderLg').removeClass('d-none');
|
||||
//~ $('#frontpage-actualidad-xs').addClass('d-none');
|
||||
//~ $('#frontpage-actualidad-md').addClass('d-none');
|
||||
//~ $('#frontpage-actualidad-lg').removeClass('d-none');
|
||||
//~ }
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user