5

私はこのコードを持っています:

jQuery(document).ready(function($) {
        $( "#tabs" ).tabs({
            collapsible: true,
            fx: { height: 'toggle', duration: 'fast'},
            cookie: { expires: 30 }
        });
    });

私は、Cookie が設定された jQuery タブを使用しています。Cookie が設定されていない場合は、タブを非表示にします。必要な jquery.cookie プラグインをインストールしました。

私の質問

タブ Cookie が設定されているかどうかを確認するにはどうすればよいですか?

4

2 に答える 2

3

cookie.jsのgetterメソッドでそれを行うことができませんでした:

* Get the value of a cookie with the given key.
*
* @example $.cookie('the_cookie');
* @desc Get the value of a cookie.
*
* @param String key The key of the cookie.
* @return The value of the cookie.
* @type String 

何かのようなもの

var cookieVal = $.cookie('ui-tabs-1');
于 2011-10-18T08:14:37.287 に答える