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

  • Home
  • SEARCH
  • 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 7923311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:16:39+00:00 2026-06-03T17:16:39+00:00

I found this code in one of the other questions on here. It’s exactly

  • 0

I found this code in one of the other questions on here. It’s exactly what i’m looking for (draggable and it neatly stacks the divs based on which one was clicked last) except I also want the div ids to be resizable but I can’t figure out how to do it without messing the code up.

http://jsfiddle.net/LQ4JT/7/

$(document).ready(function() {
    var a = 3;
    $('#box1,#box2,#box3,#box4').draggable({
        start: function(event, ui) { $(this).css("z-index", a++); }
    });
    $('#dragZone div').click(function() {
        $(this).addClass('top').removeClass('bottom');
        $(this).siblings().removeClass('top').addClass('bottom');
        $(this).css("z-index", a++);

    });
});​
  • 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-03T17:16:44+00:00Added an answer on June 3, 2026 at 5:16 pm

    Simply call .resizable() and they become resizable.

    $('#box1,#box2,#box3,#box4').draggable({
       start: function(event, ui) { $(this).css("z-index", a++); }
    }).resizable();
    

    The reason you don’t see it: in jsFiddle, jQuery UI is included without a theme. If you inspect the boxes, you can see that they have the ui-resizable class and also have the resizing handles inside them, like this one:

    <div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 1001; "></div>
    

    , but they are not styled at all. They are invisible. If you give them dimensions, you will be able to drag them and resize the boxes.

    Here is a simple demo that shows what I’m talking about.

    These are the things I have changed:

    • added .ui-resizable-se { width: 20px; height: 20px; background: cyan; position: absolute; bottom: 0; right: 0; } to the CSS, this will style the south-east handler.

    • added the .resizable() call

    • changed this selector: '#dragZone div' to '#dragZone > div' so it does not mess up the handlers and is only applied to the real boxes, not every div in the zone

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

Sidebar

Related Questions

I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
I found this code here class Usable; class Usable_lock { friend class Usable; private:
I found this code on a hacked site, what does it do exactly? It
Using other questions on here I found Amit's Page on Games including a section
I was looking around for more correct login/logout portions of code, and found this
I'm searched and found other questions on this but none have solved my issues.
I saw some other similar questions on this topic here but they were not
I've found some questions that seem related to this one, but none describes exaclty
i found this code: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource hwndSource =
I found this code using Google. private int RandomNumber(int min, int max) { Random

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.