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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:23:19+00:00 2026-06-14T07:23:19+00:00

<input id=btnPost type=button value=Post style=width: 79px /> <input id=btnAssign type=button value=Assign style=width: 79px />

  • 0
<input id="btnPost" type="button" value="Post" style="width: 79px" />
<input id="btnAssign" type="button" value="Assign" style="width: 79px" />
<div id="div1">
    <textarea rows="10" cols="2" style="width: 401px"></textarea><br />
    <input id="btnPost2" type="submit" name="btnPost" value="Post" style="width: 60px" />
</div>
<div id="div2">
    <textarea rows="10" cols="2" style="width: 401px"></textarea><br />
    <input id="btnAssign2" type="submit" name="btnAssign" value="Assign" style="width: 60px" />    
</div>

JavaScript :

$(document).ready(function () {
        $('#div1').hide();            

        $('#btnPost').click(function () {
            $('#div1').toggle('fast');                
        });                           
});

$(document).ready(function () {

        $('#div2').hide();           

        $('#btnAssign').click(function () {               
            $('#div2').toggle('fast');               
        });                            
});

My query is as follows:

When I am clicking “Post” button, “#div1” is appearing. But when I am clicking “Assign” button without minimizing “div1” then both “#div1” and “#div2” are displaying at the same time.

I tried in http://www.jsFiddle.com
for more detail follow this link : http://jsfiddle.net/RfgkU/69/

  • 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-14T07:23:20+00:00Added an answer on June 14, 2026 at 7:23 am

    If you want only one of the divs to be visible at the time, you can try this for your JavaScript:

    $(document).ready(function () {
            $('#div1, #div2').hide();            
    
            $('#btnPost').click(function () {
                $('#div1').toggle('fast');
                $('#div2').hide();
            });                                                  
    
            $('#btnAssign').click(function () {               
                $('#div2').toggle('fast');
                $('#div1').hide();
            });                            
    });
    

    As you can see on this jsfiddle

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

Sidebar

Related Questions

input type=button name=colr value= Blue onclick=document.bgColor='#0000FF' Basically i have done buttons using javascipt to
I have this html: <form action=/Home/Insert method=POST name=form1> Name: <input type=text name=Name/> <br/> Price:
Input rz value In the head I have: Event.observe(window, 'load', function() { $$(input).each(function(field){ Event.observe(field,
Input type with id 'typehere'. There is a keydown event set on typhere .
Input: <document xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance type=NOIA xsi:noNamespaceSchemaLocation=sample.xsd> <id>X17A</id> <companyName>Foo Bars</companyName> <p>Lorem ipsum dolor sit amet, consectetur
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;} input,textarea,select{*font-size:100%;} This is from the YUI reset css. What does the * before
Input xml : <Root> <RootHeader>Header</RootHeader> <Reference> <name>RefName</name> <value>Header001</value> </Reference> <NodeNumber>1</NodeNumber> <Reference> <name>RefName</name> <value>100</value> </Reference>
input field with type file used for browsing file .How to make it for
input.xml: <comp> <link id=#c1-tbl-0001/> </comp> output.xml: <comp> <link newid=#c1-tbl-0001/><tableno>1.1</tableno> </comp> i need the value
input type=text/radio/checkbox - can I treat them differently in my CSS? Other than by

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.