ソースを参照

更新 README.md

笔下光年 6 年 前
コミット
1d7c89e6f1
1 ファイル変更3 行追加2 行削除
  1. 3 2
      README.md

+ 3 - 2
README.md

@@ -26,7 +26,7 @@
 
 #### jquery-cookie保存设置示例
 ```
-        // 读取cookie中的主题设置
+	// 读取cookie中的主题设置
 	var the_logo_bg    = $.cookie('the_logo_bg'),
 	    the_header_bg  = $.cookie('the_header_bg'),
 	    the_sidebar_bg = $.cookie('the_sidebar_bg'),
@@ -41,7 +41,7 @@
 	setTheme = function(input_name, data_name) {
 	    $("input[name='"+input_name+"']").click(function(){
 	        $('body').attr(data_name, $(this).val());
-		$.cookie('the_'+input_name, $(this).val());
+	        $.cookie('the_'+input_name, $(this).val());
 	    });
 	}
 	setTheme('site_theme', 'data-theme');
@@ -49,6 +49,7 @@
 	setTheme('header_bg', 'data-headerbg');
 	setTheme('sidebar_bg', 'data-sidebarbg');
 ```
+> 由jquery读取设置,可能会受到加载速度的影响
 
 
 #### 特别感谢