Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 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

18 Experts available now in Live!

Get 1:1 Help Now