Draggable Jquery |
Hi all,
i have made an application in which i have used the draggable fields. what i actually want is that i want to save the position of the draged section. please help me to solve that problem. my code is as below:- VIEW: PHP Code: <div class="col-lg-2 connectedSortable"> i want to drag the section to other stages and save the value oin database i m not finding a headway how to do that. kindly help. how can i code for model and controller . just want basic idea. i am not understanding how it can be done. thanks in advance
Did you download and add the jQuery UI?
You need to incluse it just like jQuery. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(12-13-2016, 05:05 AM)InsiteFX Wrote: Did you download and add the jQuery UI? hi dear, i need to save the position of the draggable section. and update the database values accrdingly. i have included the jqueries the sections i m able to drag but i need to save the position. thanks in advance
12-14-2016, 05:07 AM
(This post was last modified: 12-14-2016, 05:34 AM by InsiteFX. Edit Reason: Added example for mouse position )
The d.dragable is were they are saving the json positions to the browser local storage.
You would need to change that to do an ajax call to a method in your controller to save the positions to the database. This is for a mouse position you would need to change it to the dragged positions. Write the php to access a CI Controller method to get and save. Simple Draggable Element Persistence with jQuery What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |