sortable โดยใช้ jQuery ใครที่เซียน jQuery มาตอบทีครับ

เริ่มโดย meemie989, 29 พฤษภาคม 2009, 11:33:15

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

meemie989

ผมไปดู ตัวอย่างจากลิงค์นี้มาครับ ลองทำแล้ว

http://interface.eyecon.ro/demos/sort.html

ผมอยากรู้ว่า ถ้าเรา เปลี่ยนตำแหน่งแล้ว มาเปิดหน้านี้อีกที
ให้มันแสดง ตำแหน่งล่าสุดที่เราได้จัดไว้ จะต้องทำยังไงดีครับ

ใครพอมีไอเดียมั้ยครับ  :-* :-* :-*


Tee++;

มันสามารถ Serialize data ออกมา แล้วก็ save ลงไปซะ จะใน Cookie หรือ DB ก็ตามแต่ แต่ format ที่ save น่าจะเป็น

{ key: 'xxx', 'key2: 'sss' }

พอได้ค่า ออกมาก็มาถอดออก แล้วก็ใช้ Server side script เป็นตัวจัดการ อันนี้ผมหมายถึง Sorting layout นะ

ส่วน table sort มันง่ายๆ ส่งไป save update แล้วก็จบ

ปล. ไอ้ตัวที่คุณใช้น่ะ เลิกใช้เหอะ เค้าไม่ อัพเดทแล้ว jQuery 1.3 น่าจะมีปัญหากับตัวนี้

ให้ใช้ตัวที่อยู่ใน ui.jQuery.com แทน
http://jqueryui.com/demos/sortable/#portlets
[direct=http://laravel.in.th]Laravel in Thai[/direct]
[direct=http://jquerytips.com]jQueryTips by Tee++;[/direct]
[direct=https://www.facebook.com/jQueryTips]jQueryTips Page[/direct]
[direct=https://www.facebook.com/Laravel.in.th]Laravel in Thai Page[/direct]
[direct=https://twitter.com/Teepluss]Teepluss's Twitter[/direct]


meemie989