36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
if (typeof FIXED_TABLE_HEADING_INITIALIZED === 'undefined')
|
|
{
|
|
$(function () {
|
|
|
|
setTimeout(function () {
|
|
|
|
var matchHeading_offset_top = $('.matchHeading').offset().top;
|
|
|
|
$(window).scroll(function () {
|
|
if ($(window).scrollTop() + $('.navbar-header').height() > matchHeading_offset_top)
|
|
{
|
|
if ($('.matchHeading').css('position') === 'fixed')
|
|
return;
|
|
|
|
$('.matchHeading').css({
|
|
'position': 'fixed',
|
|
'width': '90%',
|
|
'top': $('.navbar-header').height() + 'px'
|
|
});
|
|
} else
|
|
{
|
|
if ($('.matchHeading').css('position') === 'initial')
|
|
return;
|
|
|
|
$('.matchHeading').css({
|
|
'position': 'initial'
|
|
});
|
|
}
|
|
});
|
|
|
|
}, 1500);
|
|
|
|
});
|
|
}
|
|
|
|
var FIXED_TABLE_HEADING_INITIALIZED = 1; |