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