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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:11:39+00:00 2026-05-23T08:11:39+00:00

Does there exist anything to Javascript / jQuery which would allow reorder li blocks

  • 0

Does there exist anything to Javascript / jQuery which would allow reorder li blocks in the fashion iPhone does it: this effect can be seen when you reorder apps in iPhone main menu

  • All list items are blocks (images) in 4 x 4 grid

  • When reordering is enabled items have shaky animation effect

  • The user can use mouse/touch to drag to reorder the items

  • 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-23T08:11:40+00:00Added an answer on May 23, 2026 at 8:11 am

    A good place to start is jQuery UI sortable:
    http://jqueryui.com/demos/sortable/#display-grid

    All other requirements can be added, for example deletable.

    $(".apps") // container holding sortable elements
    
        // make it sortable
        .sortable()
    
        // add delete button behaviour
        .delegate(".delete","click",function(e){
            var btn = $(this)
            , container = btn.closest(".apps")
            , item = btn.closest("li")
            // shrink animation
            item.animate({
                width: 0,
                height: 0,
                margin: 24
            },function(){
                // remove item from sortable.
                item.remove();
                // make sortable see that an item has been removed.
                container.sortable("refresh");
            });
    
        });
    

    The above code assumes HTML like:

    <ul class="apps">
       <li>
          <span class="delete">x</span>
          1
       </li>
       <li>
          <span class="delete">x</span>
          2
       </li>
       <li>
          <span class="delete">x</span>
          3
       </li>
    </ul>
    

    How the list and items look like, should be achieved through CSS.
    We merely add behaviour with javascript.

    .apps {padding:10px;overflow:hidden;border:1px solid #000;}
    .apps li {display:block;width:50px;height:50px;border:1px solid #000;float:left;margin:5px;position:relative;background:#ccc;}
    .apps .delete {display:none;}
    .apps li:hover {z-index:1;}
    .apps li:hover .delete {display:block;text-indent:-9999;overflow:hidden;position:absolute;top:-10px;right:-10px;background:#000;width:20px;height:20px;cursor:default;}
    

    See above example: http://jsfiddle.net/KkXZ3/

    Ofcourse a lot more needs to be done, like:
    – add shakyness
    – create/destroy sortable on touch-and-hold
    – sliding item animation
    – droppable items so that they can turn into containers

    In any case, a lot happens in the GUI app behaviour of an iphone, I seriously doubt only 1 widget/script can provide all that behaviour. It’s actually a composition of various techniques and widgets.

    This should get you started.

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

Sidebar

Related Questions

I know the #warning directive does not exist in vb.net... is there anything like
Is there a particular reason why a generic ICloneable<T> does not exist? It would
Does there exist a website service or set of scripts that will tell you
Does there exist a parser that generates an AST/parse tree at runtime? Kind of
Does there exist any way in .Net to check before opening if a file
Does there exist a way to catch a write into write-protected page? I plan
Does there exist a cheat sheet for data structure like TreeMap, SortedMap, HashSet etc
I've been getting this error: The requested admin page does not exist. I've got
When designing an application, does there come a point where you have too many
Does anyone know whether there's a way to mock Entity Data Provider so Unit

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.