Fix bug.
This commit is contained in:
parent
deed5acf95
commit
2645649e0d
|
@ -14,11 +14,15 @@
|
|||
}
|
||||
}
|
||||
// 初始函數: 把所有的程式碼都包在init裡面,方便在之後的jQuery ready 函數裡一次呼叫
|
||||
function adjust_logo_font_size(){
|
||||
function adjust_logo_font_size(reset_flag){
|
||||
$('.navbar-header').each(function(i, v){
|
||||
var $v = $(v);
|
||||
var max_width = $v.width();
|
||||
var logo_container = $v.find('a');
|
||||
if(reset_flag){
|
||||
logo_container.css('font-size', '1.2em');
|
||||
logo_container.data('font-size', 1.2);
|
||||
}
|
||||
var logo_width = logo_container.width();
|
||||
var org_font_size = logo_container.data('font-size');
|
||||
if(!org_font_size){
|
||||
|
@ -444,7 +448,7 @@
|
|||
adjust_logo_font_size();
|
||||
// 自適應網頁使用,當使用者改變瀏覽器寬度時呼叫orbit.nav.setDropdown函數
|
||||
$(window).resize(function() {
|
||||
adjust_logo_font_size();
|
||||
adjust_logo_font_size(true);
|
||||
if ($(window).width() < 769) {
|
||||
if (resizeTimer) clearTimeout(resizeTimer);
|
||||
$('.outdropdowns').before($('.header-nav'));
|
||||
|
|
Loading…
Reference in New Issue