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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:14:54+00:00 2026-06-14T03:14:54+00:00

How can I use CSS3 transitions (or any other means) to make a jQuery

  • 0

How can I use CSS3 transitions (or any other means) to make a jQuery Sortable act more like the list re-ordering in iOS, where list items smoothly animate while dragging, so items scurry out of the way as you drag?

[editing to turn this into an FAQ and save time for anyone else who wants to figure this out]

  • 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-14T03:14:55+00:00Added an answer on June 14, 2026 at 3:14 am

    https://gist.github.com/801570 shows how to smoothly animate dragging using jQuery Sortable. Items scurry out of the way as you drag. It uses CSS3 Transitions and the effect was exactly what I am looking for. Very cool.

    Here’s the code:

    JSFIDDLE:

    http://jsfiddle.net/LTWMp/

    HTML:

    <style name="impostor_size">
        .marker + li { border-top-width:0px; }
    </style>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
    </ul>
    

    CSS:

    body { color:white; font-family:Helvetica, sans-serif;  padding: 10px}
    ul { float:left; width:300px; overflow:hidden; border-radius:6px; }
    li { display:block; position:relative; padding:12px 6px; z-index:1; margin:5px 20px; }
    li:after { background:#18629D; display:block; position:absolute; height:100%; width:100%; top:0px; left:0px; content:' '; border-radius:6px; z-index:-1; }
    li { -moz-transition:border-top-width 0.1s ease-in; -webkit-transition:border-top-width 0.1s ease-in; border-top:0px solid rgba(0,0,0,0); }
    .marker { opacity:0.0; }
    

    Script:

    var stylesheet = $('style[name=impostor_size]')[0].sheet;
    var rule = stylesheet.rules ? stylesheet.rules[0].style : stylesheet.cssRules[0].style;
    var setPadding = function(atHeight) {
        rule.cssText = 'border-top-width: '+atHeight+'px'; 
    };
    $('ul').sortable({
        'placeholder':'marker',
        'start':function(ev, ui) {
            setPadding(ui.item.height());
        },
        'stop':function(ev, ui) {
            var next = ui.item.next();
            next.css({'-moz-transition':'none', '-webkit-transition':'none', 'transition':'none'});
            setTimeout(next.css.bind(next, {'-moz-transition':'border-top-width 0.1s ease-in', '-webkit-transition':'border-top-width 0.1s ease-in', 'transition':'border-top-width 0.1s ease-in'}));
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use CSS3 Keyframes to make a image circle run without moving, i means
We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&fq=x:[10 TO 100] AND y:[20 TO 300]
You can use the Filter property of a BindingSource to do SQL like filtering.
I can use ipcs(1) to list out the active shared memory objects on a
How can I use CSS3 in Aptana Studio 2.0 with the AIR plugin? I
Can I use CSS3 properties with XHTML, or only with HTML5 web pages? Is
I'm working on a design that has some image based shadows (can't use CSS3
I've been working on a slideshow script that uses CSS3 transitions, or jQuery's animate
How can i make this background with css3? Image I want to repeat it
How can i use css or jquery to add border-top only on the first

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.