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

  • Home
  • SEARCH
  • 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 8859569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:05:59+00:00 2026-06-14T15:05:59+00:00

I’ve done this before, but for some reason it’s not working this time, and

  • 0

I’ve done this before, but for some reason it’s not working this time, and I’ve been staring at it for so long that I’ve pretty much guaranteed I’ll never find the problem…

I have this chunk of HTML, which creates a form.

<div class="paymentForm">               

    <span class="pgHeading" style="margin: 30px 0;">Payment Information</span>
    <div class="inputRedTemplate paymentType inputRoundedTop" onclick="javascript:displayPaymentFields()">
        <div class="label">Credit Card</div>
    </div>

    <div class="inputRedTemplate paymentType">
        <div class="label">Cash</div>
    </div>

    <div class="inputRedTemplate paymentType inputRoundedBottom" onclick="">
        <div class="label">Check</div>
    </div>

    <div id="cashPaymentBlock">
        <span>For cash payments, bills higher than $20 will not be accepted.</span>
    </div>

    <div id="ccPaymentBlock">
        <span class="ccDisclaimer" style="margin: 30px 0;">
           Your credit card transaction will be processed by your store location and you must
           present your credit card to the driver at the time the store delivers your order for a
           credit imprint and your signature.
        </span>

        <input id="card_name" name="cardName" class="inputRedTemplate inputFullWidth" placeholder="Cardholder Name" />
        <input id="card_number" name="cardNumber" class="inputRedTemplate inputFullWidth" placeholder="Card Number" onkeypress="return checkNumbers(event,this)" />
        <div class="error" id="err_msg" style="display: none;">Numbers only!</div>

        <input id="card_type" name="cardType" class="inputRedTemplate inputFullWidth inputRoundedBottom" placeholder="Credit Card Type" />
        <input id="card_expire_month" name="cardExpireMonth" class="inputRedTemplate gcNumber" placeholder="2 Digit Expiration Month" />
        <input id="card_expire_year" name="cardExpireYear" class="inputRedTemplate gcPin" placeholder="4 Digit Year" />
        <input id="card_zip" name="cardZip" class="inputRedTemplate inputFullWidth inputRoundedBottom" placeholder="Billing ZIP Code" />
    </div>
    <div class="btnRedTemplate btnFullWidth checkoutBtn floatLeft" style="margin-top:30px;" onclick="" title="Submit Button" />Submit</div>
</div>

I have the following script:

<script>
    $(document).ready( function () {
        hideAllPaymentBlocks();
    })

    function hideAllPaymentBlocks() {
      $('#cashPaymentBlock').hide();
      $('#ccPaymentBlock').hide();
      // add line for checks, too
    }    

    function displayPaymentFields() {
        $('ccPaymentBlock').show();  
    }

</script>

The hideAllPaymentBlocks function runs correctly in the ready function, but displayPaymentFields doesn’t seem to be running upon clicking the Credit Card div. There are no errors; it just doesn’t do anything. Can anyone point me in the right direction? As I said, I’ve been staring at this a while now, and I’m sure it’s an easy fix but I can’t get my brain working.

  • 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-14T15:06:01+00:00Added an answer on June 14, 2026 at 3:06 pm

    You forget the hash $('#ccPaymentBlock').show();

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
I need a function that will clean a strings' special characters. I do NOT
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.