Solved

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

Posted on 2015-02-11
3
255 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now