FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Newbie: very basic jquery drag drop
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Newbie: very basic jquery drag drop [message #175307] Fri, 02 September 2011 02:32 Go to next message
Ken Ashton is currently offline  Ken Ashton
Messages: 2
Registered: September 2011
Karma: 0
Junior Member
Can anyone point me to a tutorial that might help me understand using
jquery for drag/drop operations. I am trying to implement drag-drop on
a table at the simplest level, but am somehow failing to understand
most of what my Googling has revealed, and most sample show very
advanced techniques.

I have a table, say 3 x 3, (9 cells with divs in each td). Say, 4 of
the cells have numbers in them (1, 2, 3, 4). I want to drag any cell
with a number in it, to any 'empty' cell, i.e; if the dragged cell is
dropped on an occupied cell, the drag-drop operation gets cancelled

Every example I see seems to talk about moving rows and columns and
doesn't reveal any checking before the drop is completed.

As a newbie to jquery, I hoped to find a very basic example using
perhaps just one table, showing how you can select any 'occupied'
cell, and drag it to any 'unoccupied' cell - but no such luck. Most
examples seem to 'physically' move objects like images and table rows,
but I don'r really need to move anything, i.e; if can simply kill the
source cell content and update the target cell content in a successful
'drop' function.

Any advice or sample code will be greatly appreciated.

Many thanks in advance

Ken
Re: Newbie: very basic jquery drag drop [message #175308 is a reply to message #175307] Fri, 02 September 2011 03:37 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/1/2011 10:32 PM, Ken Ashton wrote:
> Can anyone point me to a tutorial that might help me understand using
> jquery for drag/drop operations. I am trying to implement drag-drop on
> a table at the simplest level, but am somehow failing to understand
> most of what my Googling has revealed, and most sample show very
> advanced techniques.
>
> I have a table, say 3 x 3, (9 cells with divs in each td). Say, 4 of
> the cells have numbers in them (1, 2, 3, 4). I want to drag any cell
> with a number in it, to any 'empty' cell, i.e; if the dragged cell is
> dropped on an occupied cell, the drag-drop operation gets cancelled
>
> Every example I see seems to talk about moving rows and columns and
> doesn't reveal any checking before the drop is completed.
>
> As a newbie to jquery, I hoped to find a very basic example using
> perhaps just one table, showing how you can select any 'occupied'
> cell, and drag it to any 'unoccupied' cell - but no such luck. Most
> examples seem to 'physically' move objects like images and table rows,
> but I don'r really need to move anything, i.e; if can simply kill the
> source cell content and update the target cell content in a successful
> 'drop' function.
>
> Any advice or sample code will be greatly appreciated.
>
> Many thanks in advance
>
> Ken
>
>
>

jquery is not PHP. Try a javascript newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Newbie: very basic jquery drag drop [message #175309 is a reply to message #175307] Fri, 02 September 2011 08:26 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Thu, 01 Sep 2011 19:32:22 -0700, Ken Ashton wrote:

> Can anyone point me to a tutorial that might help me understand using
> jquery for drag/drop operations.

Searched for jquery in the php documentation and couldn't find the bterm.
Are you sure this is a php feature?

Rgds

Denis McMahon
Re: Newbie: very basic jquery drag drop [message #175310 is a reply to message #175309] Fri, 02 September 2011 15:52 Go to previous message
Ken Ashton is currently offline  Ken Ashton
Messages: 2
Registered: September 2011
Karma: 0
Junior Member
Thanks guys

Sorry Jerry, I posted in PHP group because people here are so
knowledgeable, the few Javascript groups are full of spam and not on
my news server.

Thank you for replying.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PHP script to only be accessed by cron
Next Topic: ampersand help
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 23:10:34 GMT 2024

Total time taken to generate the page: 0.04716 seconds