kapec gan ne Posted June 20, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
Kavacky Posted June 20, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
kapec gan ne Posted June 20, 2012 Author Report Share Posted June 20, 2012 http://jsbin.com/uvowet/ ka iegut id vertibu pie start un update? Quote Link to comment Share on other sites More sharing options...
draugz Posted June 21, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
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.