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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:56:12+00:00 2026-05-13T11:56:12+00:00

I am just delving into using jQuery and I want to start off by

  • 0

I am just delving into using jQuery and I want to start off by using good coding logic. I am developing an upload site where users can select “upload from computer” or “upload from url”. I have two links above the content where users can choose to upload from their computer or from a url, and I want the content to change with jQuery (with some effects) when the user makes their choice.

Demo of what I want:
http://imgkk.com/

In the content box where it says Upload: Images URL NFO, I want my content to slide like that.

I know how to accomplish this, but I’m not sure if its the correct way. I was going to check which content is visible when the user clicks the link and act accordingly, is this the best way?

Thanks.

EDIT: In response to someones answer:

            $(".upload-options a").click(function(e){
                var id = $(this).attr('href'),
                    $target = $(id);
                    alert($target);
            if(!$target.is(':visible')){
                // Show $target here since it is not currently visible 
                alert('Show: ' + $target);
            }
            });

Markup:

            <p class="upload-options">
                <a href="#normal-upload" class="normal">Normal upload</a>
                <a href="#url-upload" class="url">URL upload</a>
            </p>
            <div id="normal-upload">
                // normal upload stuff
            </div>
            <div id="url-upload">
                // url upload stuff
            </div>

Cheers!

  • 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-13T11:56:12+00:00Added an answer on May 13, 2026 at 11:56 am

    I normally follow a pattern like this:

    <div id="links">
      <a href="#computer">Computer</a>
      <a href="#url">URL</a>
    </div>
    <div id="panes">
      <div id="computer">
    
      </div>
      <div id="url">
    
      </div>
    </div>
    

    And then the jQuery:

    $(function(){
        $("#links a").click(function(e){
          var id = $(this).attr('href'),
              $target = $(id);
    
          if(!$target.is(':visible')){
            // Show $target here since it is not currently visible 
          }
          e.preventDefault();
        })
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just looking for a good PHP Image Library, I want to display images with
Im not sure if this can be done, im just delving into templates so
I'm just delving into Objective C and Cocoa Touch and I'm trying to build
Just getting back into jQuery and JS and I am forgetting the basics.. J(.thSort).click(function()
So I am delving into MVVM using C# with WPF (using Expression Blend) and
I am just now delving into the world Silverlight. I am able to accomplish
I've just starting delving into the wonders of Java ME but have become frustrated
I have just started delving into the world of functional programming. A lot of
I am just delving into the spring mvc (or spring roo), from what i
I have run into an interesting performance conundrum but before I start delving into

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.