kapec gan ne Posted June 20, 2012 Report Posted June 20, 2012 (edited) Sveiki! piem., no db tiek izvaditi ieraksti () vini tiek kartoti pec lauka sort(int) ka lai izveido tadu listu, lai varetu vienkasi ar drag un drop mainit ierakstu kartibu un saglabat jauno vietu db pec izmainam:) Edited June 20, 2012 by kapec gan ne Quote
Kavacky Posted June 20, 2012 Report Posted June 20, 2012 Izmanto kādu drag & drop bibliotēku no, piemēram, jQuery krājumiem. Izmanto callback'u vai kādu citu, tev derīgu metodi, izmaiņu saglabāšanas pieprasījumam. Quote
kapec gan ne Posted June 20, 2012 Author Report Posted June 20, 2012 http://jsbin.com/uvowet/ ka iegut id vertibu pie start un update? Quote
draugz Posted June 21, 2012 Report Posted June 21, 2012 (edited) function get_order(){ var id_list = []; var li_list = $("#sortable li"); for(var i in li_list){ id_list.push($(li_list[i]).attr('id')); } return_id_list; } Izsauc funkciju get_order() kad tev vajag un rezultātā saņemsi masīvu ar elementu ID Edited June 21, 2012 by draugz Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.