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
const debounce = (delay) => (fn) => { | |
let timeoutId; | |
return (...args) => { | |
clearTimeout(timeoutId); | |
timeoutId = setTimeout(() => { | |
fn(...args); | |
}, delay); | |
}; | |
}; | |
const speak = (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
/* select element styling */ | |
jQuery('.rtp-select').each( function() { | |
var self = jQuery(this), | |
title = self.attr('title'); | |
if( jQuery('option:selected', this).val() !== '' ) title = jQuery('option:selected', this).text(); | |
self | |
.css({ | |
'z-index': 10, | |
'opacity': 0, |
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
/* Equal Height */ | |
jQuery('.elemWrapper').each(function(){ | |
var max = Math.max.apply(Math, jQuery(this).find('.elem').map(function() { return jQuery(this).height(); })); | |
jQuery(this).addClass('fixed-height').find('.elem').height(max); | |
}); |
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
/* Smooth Scroll */ | |
jQuery('.rtp-back-to-top').click( function() { | |
jQuery('html, body').animate({ | |
scrollTop: jQuery( jQuery(this).attr('href') ).offset().top | |
}, 1000); | |
return false; | |
}); |