Solved

JQuery Sortable; need to be able to drag and drop rows within a table

Posted on 2015-02-11
3
261 Views
Last Modified: 2015-02-12
Let me start by telling you that I am a complete newbie so please be patient with me.  
I am trying to build a table which would allow the users to sort the table results using drag/drop.  I am using PHP to connect to a SQL Server database.  It has been recommended that I use J-Query Sortable found at this website:  JQuery-Sortable

About 3/4 way through the above website, there is an example for sorting rows within a table.  But I can not figure out how to make it work.  If someone could please provide me with step by step instructions on what to do I would really appreciate it.  

Because I am so new to coding / php / JQuery, I need to use the same JQuery the other coders on the team are using or be able to demonstrate why something else would be better for the team to use.  So Ideally, I'd like to get this one to work.
sjstest3.html
0
Comment
Question by:SueJStevens
  • 2
3 Comments
 
LVL 44

Assisted Solution

by:Rainer Jeschor
Rainer Jeschor earned 500 total points
ID: 40605023
Hi,
as far as I can see, the initial selector is wrong.
It should be
$('#sortable').sortable({

Open in new window

Here a sample based on your code:
http://jsfiddle.net/EE_RainerJ/mdkbqgm7/
HTH
Rainer
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40605025
And: in your HTML file, you miss the script reference to jQuery :-)
You just have jQuery UI reference.
0
 

Author Closing Comment

by:SueJStevens
ID: 40606550
Thank you.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question