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
(function ($, Drupal, drupalSettings) { | |
Drupal.behaviors.progressBar = { | |
attach: function (context) { | |
//add a listener for scroll | |
$(window).scroll(() => { | |
if (document.querySelector('.js-progress-bar').length) { | |
const ProgressText = document.querySelector('.progress-bar__text'); |
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
$(function() { | |
$(document).on('click', 'a[href^="#"]', function(e) { | |
// target element id | |
var id = $(this).attr('href'); | |
// target element | |
var $id = $(id); | |
if ($id.length === 0) { | |
return; | |
} |
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
// Bouncing link | |
a:hover { | |
animation: bounce .7s ease-in-out; | |
} | |
@keyframes bounce { | |
0%, 20%, 50%, 80%, 100% {transform: translateY(0);} | |
40% {transform: translateY(-5px);} |
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
(function ($, Drupal) { | |
$(window).on('scroll', function () {; | |
scrollingSwitch(); | |
// console.log('scrolling scrolling scrolling'); | |
}); | |
function scrollingSwitch() { |
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
<div class="article__copy-link__container"> | |
<div class="button--group-message article__copy-link js-copy-wrap"> | |
<a class="button button--secondary button--icon button--icon-left button--has-message button--copy-link js-copy-link" href="#"> | |
{{ 'Copy the link'|t }} | |
<svg class="icon icon--link"> | |
<use xlink:href="#icon-link"/> | |
</svg> | |
</a> | |
<div class="button__message js-copy-message"> | |
{{ 'Link copied to clipboard'|t }} |
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
{% set classes = [ | |
'paragraph', | |
'paragraph--type--' ~ paragraph.bundle|clean_class, | |
view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class, | |
not paragraph.isPublished() ? 'paragraph--unpublished', | |
'grid grid--medium image-overlay', | |
grid_medium | |
] %} |
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
$('.training-index__filters-form-inner .form-checkbox').each(function () { | |
if (this.checked) { | |
// console.log('YES'); | |
$(this).parents('.fieldset-wrapper').show(); | |
$(this).parents('fieldset legend').toggleClass('is-open'); | |
} | |
}); |
NewerOlder