0

我有一小部分代码..

$("#custom_background span").click(function () {
    $("#account ,.minwidth_IE ,.main .main-head ,#fa_toolbar").removeClass("bg1 bg2 bg3 bg4 bg5 bg7 bg8 bg_custom").addClass($(this).attr("id"));

    $("#vbar").removeClass("bg1 bg2 bg3 bg4 bg5 bg7 bg8 bg_custom bg11 bg21 bg31 bg41 bg51 bg71 bg81").addClass($(this).attr("id")+ (+1));

    $("#tbar").removeClass("bg1 bg2 bg3 bg4 bg5 bg7 bg8 bg_custom bg12 bg22 bg32 bg42 bg52 bg72 bg82").addClass($(this).attr("id")+ (+2));

    my_setcookie("custom_background", $(this).attr("id")+ (''), true);
});

我确定我必须写另一个 my_setcookie.. 但我不知道怎么做。如果我为每个元素设置,它会破坏我的论坛。问题是,如何为#tbar、#vbar 和#account、miniwidth_IE 等设置cookie。非常感谢!

4

0 回答 0