TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   Ajax Drag and Drop (http://www.talkphp.com/javascript-ajax-e4x/6075-ajax-drag-drop.html)

captainmerton 12-29-2011 05:15 PM

Ajax Drag and Drop
 
I'm looking to potentially implement some drag and drop functionality to my website. Property owners can add and delete images related to their villa rental property listing. They can select one image as a lead image which is the image that appears in search listings on tnhe site. I would like to use Ajax to allow ordering of the images using drag and drop and also just clicking on an image to make it th lead without having to click the form checkbox then press update.

Question i have is:

1. How difficult would this be to do? I have zero ajax experience and very limited javascript although i have written the site from scratch using php and mysql.
2.Could i use jquery to do this?
3. If i was to contract in someone to do it does this feel like a complicated piece of work or is it pretty straightforward for someone with the right skillset and if so is this a small piece of work?

Thanks,
Ewan

wGEric 01-05-2012 10:52 PM

jQuery would make that easy to do. jQuery UI actually provides sortable functionality: http://jqueryui.com/demos/sortable/

Using that sortable feature from jQuery UI you can supply a change callback that will then use $.post or some other jQuery AJAX method to submit the data to your backend.

You can use jQuery's click event to setup the ajax to save the default image.

captainmerton 01-08-2012 05:26 PM

Thanks Eric.

This kind of thing is exactly what i want:

http://jqueryui.com/demos/sortable/#display-grid

How easy is jQuery to learn, understand and implement?

Cheers,
Ewan

maeltar 01-09-2012 07:45 AM

jQuery is amazingly simple to learn and use, and once you start using it you will see so many applications for it on your sites. I've been using it for some time and still get a buzz when I do what is for jQuery a simple thing that would have normally taken 100's of lines of code to do long hand...

captainmerton 01-12-2012 06:10 PM

Bought this book to help me get up to speed:

http://www.amazon.co.uk/JavaScript-j.../dp/1449399029

Will let you know how i get in. Cheers.

maeltar 01-13-2012 02:22 PM

I picked up :

http://www.amazon.co.uk/JQuery-Visua...6464480&sr=1-3

Not got the best of reviews but it is good enough for my needs which is mainly refrence..


All times are GMT. The time now is 06:27 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0