diff --git a/marietje/marietje/static/js/queue.js b/marietje/marietje/static/js/queue.js index 554b31a..f4a75b3 100644 --- a/marietje/marietje/static/js/queue.js +++ b/marietje/marietje/static/js/queue.js @@ -87,6 +87,8 @@ $(function () { }); $(document).on('touchstart', '.artist, .title', function(){ + noRemove = true; + setTimeout(function(){ noRemove = false; }, 500); $('.song-info').remove(); var row = $(this).parent(); var timeLeft = row.find('.time-left'); @@ -95,12 +97,14 @@ $(function () { $('body').append('Requested By: ' + row.find('.requested-by').text() + '
' + text + '
'); var offset = row.offset(); - $('.song-info').css('top', offset.top - $(document).scrollTop() + row.height()) + $('.song-info').css('top', offset.top + row.height()) .css('left', offset.left).css('backgroundColor', '#EEEEEE').width(row.width() - 16); }); - $(document).on('click', '.song-info', function(){ - $(this).remove(); + $(document).on('click', function(){ + if(!noRemove) { + $('.song-info').remove(); + } }); getSongs();