Skip to content

Instantly share code, notes, and snippets.

@itamar
Created September 4, 2017 09:09
Show Gist options
  • Select an option

  • Save itamar/281ef9693658b760e2e5c51e019fce4e to your computer and use it in GitHub Desktop.

Select an option

Save itamar/281ef9693658b760e2e5c51e019fce4e to your computer and use it in GitHub Desktop.
// Line #624, I needed to "reset the audioPlayers array
function profileAudioPlayers(){
audioPlayers = []
$('.provider-audio').each ...
}
// Line #236
Changed from:
$('.provider-audio__play').on('click touchstart', function(){
To:
$('body').on('click touchstart', '.provider-audio__play', function(){
// Line #248
Changed from:
$('.provider-audio__waveform').on('click touchstart', function(){
To:
$('body').on('click touchstart', '.provider-audio__waveform', function(e){
// Line #269
Changed from:
$('.provider-audio__next').on('click touchstart', function(){
To:
$('body').on('click', '.provider-audio__next', function(){
// Line #269
Changed from:
$('.provider-audio__next').on('click touchstart', function(){
To:
$('body').on('click', '.provider-audio__next', function(){
// Line #289
Changed from:
$('.provider-audio__prev').on('click touchstart', function(){
To:
$('body').on('click', '.provider-audio__prev', function(){
// Line #289 - Same concept with the Text progress.
Changed from:
$('.text-progress textarea').on('input', function(){
To:
$('body').on('input', '.text-progress textarea' function() {
// Under profileScrollElements function, line #501 - it throw me an exception so I added a return if no rule
rules.forEach(function(rule,index){
if(rule === ''){ return }
// I also added an option to close the modal box with ESC key :)
$(document).keyup(function(e) {
if (e.keyCode == 27) {
$('.modal.active').removeClass('active');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment