开发者

How do I set a cookie for Jquery sortable grid

I'm trying to set a cookie for the Jquery sortable in a grid layout. This is the sortable grid

I tried using the Jquery cookie plugin as explained here

I downloaded the plugin and replaced the example code:

$(function() {
        $( "#tabs" ).tabs({
            cookie: {
                // store cookie for a day, without, it would be a session cookie
                expires: 1
            }
        });
    });

With this one:

$(function() {
        $( "#sortable" ).sortable({
            cookie: {
                // store cookie for a day, without, it would be a session cookie
                expires: 1
            }
        });
    });

It did not work..Is the cookie example a basic use example and no开发者_如何学编程t complete? What else can I try?


.sortable does not support cookies directly. Look under the options tab at the site. Tabs has a cookie option, sortable does not.

Try looking here:

http://forum.jquery.com/topic/ui-sortable-and-save-to-cookie

and here:

http://www.shopdev.co.uk/blog/sortable-lists-using-jquery-ui/

There is something about using cookies with .sortable.

If not, then try googling, there seems to be a lot of hits for it, so there should be something useful out there. Best of luck with it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜