61 lines
1.3 KiB
JavaScript
61 lines
1.3 KiB
JavaScript
/**
|
|
* @file
|
|
* quartiers_de_demain behaviors.
|
|
*/
|
|
(function (Drupal) {
|
|
|
|
'use strict';
|
|
|
|
Drupal.behaviors.quartiers_de_demain = {
|
|
attach: function (context, settings) {
|
|
|
|
console.log('It works!');
|
|
|
|
}
|
|
};
|
|
|
|
|
|
} (Drupal));
|
|
|
|
|
|
jQuery(document).ready(function($){
|
|
|
|
|
|
$('.open-block').click(function(){
|
|
$(this).toggleClass('opened');
|
|
|
|
$('.header_nav_container').toggleClass('display-nav-opened');
|
|
|
|
if(mobile == true){
|
|
$("body").css("overflow","hidden");
|
|
}
|
|
|
|
});
|
|
|
|
// Hide the header_nav_container when a link inside it is clicked
|
|
$('.header_nav_container li').click(function() {
|
|
$('.header_nav_container').fadeOut();
|
|
});
|
|
|
|
});
|
|
|
|
|
|
// // /////////////////
|
|
// //// ancre dans texte au click parragraphe correspondant arrive en dessous du header
|
|
|
|
|
|
// (function($, window) {
|
|
// var adjustAnchor = function() {
|
|
// var $anchor = $('#block-quartiers-de-demain-views-block-statics-block-1'),
|
|
// fixedElementHeight = 350;
|
|
// if ($anchor.length > 0) {
|
|
// $('html, body').stop().animate({scrollTop: $anchor.offset().top - fixedElementHeight }, 0);
|
|
// }
|
|
// };
|
|
|
|
// $(window).on('hashchange', function() {
|
|
// adjustAnchor();
|
|
// });
|
|
|
|
// })(jQuery, window);
|
|
|