TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Sortable Example in jQuery
Mithilesh Kumar
Jun 25
2016
Code
706
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
<
html
>
<
head
>
<
title
>
</
title
>
<
script
src
=
"Scripts/jquery-2.1.1.js"
type
=
"text/javascript"
>
</
script
>
<
script
src
=
"Scripts/jquery-ui.js"
type
=
"text/javascript"
>
</
script
>
<
link
href
=
"themes/vader/jquery-ui.css"
type
=
"text/css"
rel
=
"stylesheet"
/>
<
link
href
=
"themes/vader/theme.css"
type
=
"text/css"
rel
=
"stylesheet"
/>
<
script
type
=
"text/javascript"
>
$(document).ready(function() {
$("#ulsortable").sortable();
});
</
script
>
<
style
type
=
"text/css"
>
#ulsortable {
list-style-type: none;
margin: 5px;
padding: 5px;
width: 60%;
}
#ulsortable li {
margin: 5px;
padding: 5px;
font-size: 20px;
height: 20px;
background-color: aqua;
border: 2px solid gray;
cursor: pointer;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
ul
id
=
"ulsortable"
>
<
li
>
List Item1
</
li
>
<
li
>
List Item2
</
li
>
<
li
>
List Item3
</
li
>
<
li
>
List Item4
</
li
>
<
li
>
List Item5
</
li
>
</
ul
>
</
div
>
</
form
>
</
body
>
</
html
>
JQuery
HTML