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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:51:18+00:00 2026-05-11T19:51:18+00:00

I want to use an inner div to drag around an outer div, for

  • 0

I want to use an inner div to drag around an outer div, for example:

<div id="outerDiv" style="height:300px; width:200px;">
     <div id="innerDiv" style="height:10px; width:200px;"></div>
</div>

If this is my code, assuming the proper JQuery plugins are attached to use draggable, etc… How can I make it so that when the user clicks and drags the innerDiv, it drags the entire outerDiv. But so that when the user clicks and tries to drag the outerDiv, it doesn’t work.

Basically I want the innerDiv to control the draggability of the outerDiv.

Any Ideas?

Thanks,
Matt

  • 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-11T19:51:18+00:00Added an answer on May 11, 2026 at 7:51 pm

    You should take a look at the handle property for draggable. Something like this (untested):

    $("#outerDiv").draggable({ handle: "innerDiv" });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this code... <div id=outer style=position:absolute;width:100px;height:100px;border:1px solid black> <div id=inner> <img src=http://rabbitempire.org/wp-content/uploads/Pet-Rabbit-Facts.jpg> </div> </div>
Basically, I want an outer DIV's height to be dictated by its inner DIVs
Problem is simple. I want a full height div (#inner) inside another full height
I want to show the inner children of the div class {list} when use
In this example http://jsbin.com/inoka4 no width is defined for parent element if i want
I want to have an inner div that sites inside different sized container divs,
I'm creating a horizontal menu bar. There is an outer div that contains inner
Say I have element sequence like below : <div style=margin-bottom:9px;line-height:normal;margin-top:4px></div> <div style=margin-bottom:9px;line-height:normal;margin-top:4px>Something Here</div> <div
In have two div in the page,the outer and the inner. I bind the
I want to use jQuery to popup a div layer when click attach pic

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.