mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 19:52:20 +01:00
Display mobile info box at the correct position.
This commit is contained in:
@ -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('<span class="song-info">Requested By: ' + row.find('.requested-by').text() + '<br>' + text
|
||||
+ '</span>');
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user