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 6713811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:25:26+00:00 2026-05-26T08:25:26+00:00

I am using CodeIgniter with the jQuery UI Sortable widget, to change my menu

  • 0

I am using CodeIgniter with the jQuery UI Sortable widget, to change my menu list position.

For example, if my menu list is like this:

<li>menu 1</li>
<li>menu 2</li>
<li>menu 3</li>
<li>menu 4</li>

I want to place the first menu under the second and have it stay there.

However I am stuck on the jQuery a bit.

This is what gets the list elements:

 <ul id="sortable"> 
    <?php  foreach ($rows as $r)
    {
        echo '
        <li id="sort_'.$r->pid.'" class="ui-state-default"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span> 
            ' . $r->page_name . '
        </li>';
    }

    ?>
</ul>

and the jquery:

$( "#sortable" ).sortable({
    placeholder: "ui-state-highlight",
    opacity: 0.6,
    update: function(event, ui) {
        var info = $(this).sortable("serialize");
        alert(info);
    }
});
$( "#sortable" ).disableSelection(); 

I managed to alert the array of the results.

Now I don’t want anybody to write this for me, just a hint on how to use ajax with this for the update.

  • 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-05-26T08:25:26+00:00Added an answer on May 26, 2026 at 8:25 am

    I think you can use $.ajax(..) inside your update method.

    http://api.jquery.com/jQuery.ajax/

    $.ajax({
      url: "submit.php",
      data: info,
      context: document.body,
      success: function(){
        // success
      }
    });
    

    I just check info is already serialized, so this should work. You can add method property depending on submit type (post, get).

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

Sidebar

Related Questions

I trying to make my first AJAX with JSON call using jQuery and CodeIgniter.
I have integrate jQuery thick box in Codeigniter, when I am using this thick
I’m using jquery to send text back to my ajax.php controller like this: var
I'm working on a Facebook-like status update using jquery in Codeigniter. So far, I've
Im using JQUERY + CodeIgniter. I can't seem to get the returned data to
I'm using CodeIgniter (because it's awesome) and I have something like: <?php echo anchor(/,
I am using codeigniter framework and in view i am using jquery. Now, I
I found this? Is this the best way to do it? http://weblogs.asp.net/dwahlin/archive/2009/05/03/using-jquery-with-client-side-data-binding-templates.aspx I'm looking
I'm attempting to following the tutorials found here: http://www.ifadey.com/2010/06/crud-using-jquery-and-codeigniter/ My code is updated to
Within my CodeIgniter app, I'm using a Jquery calendar pop-up that also captures time

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.