Updated.
This commit is contained in:
parent
dd72708b34
commit
3ad9b26c9a
|
@ -748,16 +748,28 @@ function transdate(){
|
||||||
}
|
}
|
||||||
$(document).on('focusin','*',function(event){
|
$(document).on('focusin','*',function(event){
|
||||||
// event.stopPropagation();
|
// event.stopPropagation();
|
||||||
var _this = $(document.activeElement);//$(this);
|
if(window.focus_timeout_id){
|
||||||
var topOffset = window.temp_scrollY + window.top_barrier_height;
|
window.clearTimeout(window.focus_timeout_id);
|
||||||
var ele_offset = _this.offset().top - topOffset;
|
|
||||||
if(ele_offset < 0){
|
|
||||||
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
|
||||||
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
|
||||||
}
|
}
|
||||||
if ($('header>.kenjohn').attr('class') == "kenjohn" && _this.is('a.orbit-bar-logo')){
|
var _this = $(document.activeElement);//$(this);
|
||||||
$('header>.kenjohn').addClass('navRel');
|
if(!_this.hasClass('close-screen-btn')){
|
||||||
$('#gotocenter').focus();
|
var topOffset = window.temp_scrollY + window.top_barrier_height;
|
||||||
|
var ele_offset = _this.offset().top - topOffset;
|
||||||
|
if(ele_offset < 0){
|
||||||
|
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
||||||
|
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
||||||
|
}
|
||||||
|
window.focus_timeout_id = window.setTimeout(function(){
|
||||||
|
var ele_offset = _this.offset().top - topOffset;
|
||||||
|
if(ele_offset < 0){
|
||||||
|
window.scroll(window.temp_scrollX, window.temp_scrollY + ele_offset);
|
||||||
|
window.temp_scrollY = Math.max(window.temp_scrollY + ele_offset, 0);
|
||||||
|
}
|
||||||
|
}, 800);
|
||||||
|
if ($('header>.kenjohn').attr('class') == "kenjohn" && _this.is('a.orbit-bar-logo')){
|
||||||
|
$('header>.kenjohn').addClass('navRel');
|
||||||
|
$('#gotocenter').focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.group').each(function(){
|
$('.group').each(function(){
|
||||||
|
|
Loading…
Reference in New Issue