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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:45:34+00:00 2026-06-10T19:45:34+00:00

I need to call the jquery.animate on a nested div. The div structure is

  • 0

I need to call the jquery.animate on a nested div. The div structure is something like this

<div id="jsPlumb_1_4" class="container">
       <div id="PlanItemPL1" class="PlanItem">
            <div id="window1" class="window">
            </div>
        </div>
</div>

I am interested in doing operations such as mousedown event, animate event on the div class window. Can somebody please let me know what selector should I write. Thanks for the help.

  • 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-10T19:45:36+00:00Added an answer on June 10, 2026 at 7:45 pm

    I’d suggest, without further specifics in the question, a generic approach:

    $('#jsPlumb_1_4').on('mousedown', function(e){
        $(this).find('div.window').animate({'width' : '100px'}, 1000);
    });
    

    JS Fiddle demo.

    In this demonstration I’m binding the mousedown event to the #jsPlumb_1_4 element (the event will propagate from any of its child elements), and triggering the animate() on the contained div.window element.

    To make it a little more interesting, I’m adding a mouseup event too, so that on mousedown the div.window shrinks, and on mouseup it grows:

    $('#jsPlumb_1_4').on('mousedown mouseup', function(e){
        var newWidth = e.type == 'mousedown' ? '50%' : '80%';
        $(this).find('div.window').animate({'width' : newWidth}, 1000);
    });​
    

    JS Fiddle demo.

    e.type retrieves the event (mouseup or mousedown), and the newWidth variable is either 50% or 80% depending on whether the event is equal to mousedown or not.

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

Sidebar

Related Questions

I need to call some jQuery .load() function from flash. i Use this: import
I need to perform an action after a jQuery .load call, currently this is
I need to call a function on a using jquery. This function needs to
I have a small piece of jQuery like this: $('.remove-header').on('click',function(){ arc.event_handler.remove_header_click.call(this); }); The .remove-header
If I need call this functions one after other, $('#art1').animate({'width':'1000px'},1000); $('#art2').animate({'width':'1000px'},1000); $('#art3').animate({'width':'1000px'},1000); I know
I need to call a jquery function through the onchange event of this DropDownList.
I need to call a web service from jQuery, when I put the breakpoint
I have a jQuery AJAX call that I will need to do multiple times
I am trying to call Ajax with jQuery and need to pass a variable
I need to call a JS function with a C# parameter. This is inside

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.