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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:13:42+00:00 2026-06-15T08:13:42+00:00

The following code doesn’t seem to work. How would I change it in order

  • 0

The following code doesn’t seem to work. How would I change it in order to make the div change the position from top?

 div { width:220px; height:170px; margin: 10px 50px 10px 10px;
    background:yellow; border:2px groove; float:right; }

 #alt { width:20px; height:170px; margin: 10px 50px 10px 10px;
        background:blue; border:2px groove; float:right; }

  #altLevel { width:10px; height:20px; 
        background:red; border:2px groove;  }



$('div').mouseclick(function() {
$( '#altLevel').css( 'top', '+=10' );
});
  • 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-15T08:13:43+00:00Added an answer on June 15, 2026 at 8:13 am

    You have to add position:absolute or position:fixed to the styles for #altLevel before you can alter its position. In addition, give it a default position of top:0 or whatever you like:

    #altLevel { 
        width:10px; height:20px; 
        position:absolute; top:0;
        background:red; border:2px groove;  
    }
    

    Once you do that, your JavaScript should work with a small modification:

    $('div').click(function() {
        $('#altLevel').css('top', '+=10');
    });​
    

    http://jsfiddle.net/mblase75/mGAKe/

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

Sidebar

Related Questions

The following Code doesn't seem to work,I want the email keyboard with @ and
The following code doesn't work, somehow I can't get the int value from the
Why the following code doesn't work? I want that input would be disabled for
The following code doesn't seem to work in FF(3.6) and IE(7) on Windows XP.
Why the following code doesn't work? (if I change remote source there to local,
I don't understand why the following code doesn't work. (jQuery 1.6.4) HTML: <div class=test></div>
Trying the following code doesn't seem to work out for me quite as planned:
I am learning from a tutorial, and the following code doesn't work: SmsMessage msg[]
following code doesn't work with input: 2 7 add Elly 0888424242 add Elly 0883666666
The following code doesn't work (of course), because the marked line does not compile:

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.