|
|
@ -242,6 +242,20 @@ $(window).resize(function() { |
|
|
|
|
|
|
|
|
|
|
|
$(document).scroll(function() { |
|
|
|
$(document).scroll(function() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var valor = $('body').outerHeight() - 700; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($(this).scrollTop() > 100) { |
|
|
|
|
|
|
|
$('.bottom_actions').addClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$('.bottom_actions').removeClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($(this).scrollTop() > valor) { |
|
|
|
|
|
|
|
$('.bottom_actions').removeClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$('.bottom_actions').addClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//Exercise warning fixed at the top |
|
|
|
//Exercise warning fixed at the top |
|
|
|
var fixed = $("#exercise_clock_warning"); |
|
|
|
var fixed = $("#exercise_clock_warning"); |
|
|
|
if (fixed.length) { |
|
|
|
if (fixed.length) { |
|
|
@ -289,37 +303,9 @@ $(document).scroll(function() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Bottom actions. |
|
|
|
|
|
|
|
if ($('.bottom_actions').length) { |
|
|
|
|
|
|
|
if (!$('.bottom_actions').attr('data-top')) { |
|
|
|
|
|
|
|
// If already fixed, then do nothing |
|
|
|
|
|
|
|
if ($('.bottom_actions').hasClass('bottom_actions_fixed')) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remember top position |
|
|
|
|
|
|
|
var offset = $('.bottom_actions').offset(); |
|
|
|
|
|
|
|
$('.bottom_actions').attr('data-top', offset.top); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($('.bottom_actions').attr('data-top') > $('body').outerHeight()) { |
|
|
|
|
|
|
|
if ( ($('.bottom_actions').attr('data-top') - $('body').outerHeight() - $('.bottom_actions').outerHeight()) >= $(this).scrollTop()) { |
|
|
|
|
|
|
|
$('.bottom_actions').addClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
$('.bottom_actions').css("width", "100%"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$('.bottom_actions').css("width", ""); |
|
|
|
|
|
|
|
$('.bottom_actions').removeClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if ( ($('.bottom_actions').attr('data-top') - $('.bottom_actions').outerHeight()) <= $(this).scrollTop()) { |
|
|
|
|
|
|
|
$('.bottom_actions').addClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
$('.bottom_actions').css("width", "100%"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$('.bottom_actions').removeClass('bottom_actions_fixed'); |
|
|
|
|
|
|
|
$('.bottom_actions').css("width", ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_url_params(q, attribute) { |
|
|
|
function get_url_params(q, attribute) { |
|
|
|
var vars; |
|
|
|
var vars; |
|
|
|
var hash; |
|
|
|
var hash; |
|
|
|