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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:43:07+00:00 2026-05-28T00:43:07+00:00

I really have no idea how to approach this. I’ve been reading for like

  • 0

I really have no idea how to approach this. I’ve been reading for like 10 hours just about javascript, html, css,if statements, conditionals, etc etc (beginner attempting to learning everything >_<). It’s been a ton of fun but I’m rather stuck on how to approach this.

Here’s what I’m trying to accomplish. I want a user to be able to click 1 of 2 pictures and then have the value of the picture change from 0 to 1….or selected? I then want to do this exact scenario one additional time (so essentially two different input choices). At the end I would like to have content inserted else where on the page via a div if both values are changed from 0 to 1.

I also apologize for blatantly being uneducated in regards to my question. I’m doing my best to learn though and I absolutely love trial and error.

Edit: This is my first post on this site. You guys are unbelievable. Give me some time to read through all of the comments. I have to look up a lot of what you guys are referencing to fully understand it.

Regardless thanks again.

  • 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-28T00:43:07+00:00Added an answer on May 28, 2026 at 12:43 am

    html

    <img src="" id="Picture1">
    <img src="" id="Picture2">
    

    Script

    //Apply a click event to both pictures and have it callback to the checkClick function
    $("#Picture1, #Picture2").click(checkClick);
    
    function checkClick(e)
    {
        //$(this) will refer to the currently clicked picture, 
        //jQuery's .data function allows storing data within the object
        $(this).data("clicked",1);
    
        //Grab the data values from both pictures
        var p1 = $("#Picture1").data("clicked");
        var p2 = $("#Picture2").data("clicked");
    
        //Check if both equal 1 (will once each has been clicked)
        if( p1 == 1 && p2 == 1 )
            ShowContent();
    }
    
    function ShowContent()
    {
        //do your code to show content
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really have no idea how to go about this. So far all I
I really have no idea why I'm struggling with this so much. I'm scraping
I have really no idea why I'm asking this as this a really completely
It doesn't really have to add newlines, just something readable. Anything better than this?
I really have no idea what to title this so someone PLEASE feel free
this problem is not really uncommon, but i don't really have an idea how
Since I'm pretty new this question'll certainly sound stupid but I have no idea
I have classes like this one: class SomeObject { public function __construct($param1, $param2) {
Currently I have a url like this http://<client_name>.website.com/index.php?function_name&cat=32 I want to set things up
I have a small html/css site powered by jQuery, generated with PHP, you can

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.