Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8179231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:57:22+00:00 2026-06-06T23:57:22+00:00

I am trying to use jQuery UI Sortable to re-arrange some items in an

  • 0

I am trying to use jQuery UI Sortable to re-arrange some items in an HTML list. I’ve got it functioning, but I’m stuck on how to use the data.

I am using Codeigniter and I am passing the order via serial to the update_order method in my Category controller.

I know how I’m going to enter it into the database, but I’m not sure how to use the serial so that I can do it. I’m assuming it’s in a POST variable of some sort, but I don’t know what it is.

The JS:

<script type="text/javascript"> 
$(document).ready(function() {
    $("#order").sortable({
        update : function () {
            order = $('#order').sortable('serialize');
            $.ajax({
                url: "<?=base_url().'admin/category/update_order'?>",
                type: "POST",
                data: order,
                success: function(){
                    alert("success");
                }
            });
        }
    });
}
);
</script>

The HTML:

<ul id="order">
    <li id="item_1">Item 1</li>
    <li id="item_2">Item 2</li>
    <li id="item_3">Item 3</li>
    <li id="item_4">Item 4</li>
    <li id="item_5">Item 5</li>
    <li id="item_6">Item 6</li>
</ul>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:57:24+00:00Added an answer on June 6, 2026 at 11:57 pm

    If doing serialize, do $this->input->post('item')

    It’s going to be whatever is in front of the _1, _2, etc in the li tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jquery sortable functionality to sort a list of items in my
Trying to use JQuery to scroll through a ul li list using class next
As I am trying to work on sorting some data using Jquery, I thought
I am trying to use jQuery's draggable and sortable to sort elements listed inside
I'm trying to use jquery to submit my form like so but it's not
I'm trying to use jQueryUI draggable/droppable/sortable to move (not copy) items from a source
Trying to use JQuery Easing plugin in my wordpress but its giving me following
im trying to use jquery tools tooltip ( http://flowplayer.org/tools/tooltip.html#events)on a form to show hints
im trying to use jquery bbq for remembering page with ajax. but i wonder,
I'm trying use jQuery to modify the HTML of the WordPress [caption] shortcode, whose

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.