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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:52:57+00:00 2026-06-10T06:52:57+00:00

I am using simpleCart js. I would like to have the checkout button and

  • 0

I am using simpleCart js. I would like to have the checkout button and shipping cost hidden until the customer selects UK or Rest of World. Here is the select block:

<select id="shippingSelect" onchange="simpleCart.update();">
 <option value="nothing" selected="selected">Choose Shipping Location</option>
 <option value="uk">UK</option>
 <option value="world">Rest of World</option>
</select> 

Under that is the shipping cost and checkout button:

<div class="place_order" style="display:none">
 <span id="simpleCart_shipping" class="simpleCart_shipping"></span>
 <a href="javascript:;" class="simpleCart_checkout btnDownload">checkout</a>
</div>

The simpleCart script that generates the cart:

<script>
simpleCart({
    cartColumns: [
        { attr: "name" , label: "Item" },
        { view: "decrement" , label: false , text: "-" },
        { attr: "quantity", label: "Quantity", view: "input"},
        { view: "increment" , label: false , text: "+" },
        { attr: "price", label: "Price"},
        { attr: "total" , label: "Subtotal", view: "currency"  }
    ],
    cartStyle: "table",
    currency: "GBP",
    language: "english-us",
    checkout: { 
        type: "PayPal" , 
        email: "email@ddress",
        success: "success.html"
    },
    shippingCustom: function(){ 
                 if( $("#shippingSelect").val() == "uk" ){
                      return 0;
                 } else {
                      return 2;
             }
        }
    });


</script>

I thought I could use $('.place_order').css('display', 'inline'); to change the inline style but I don’t know how to do it, whether to incorporate it into the simpleCart script or have it trigger a separate script? Perhaps there is a more efficient way? Thanks!

  • 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-10T06:52:58+00:00Added an answer on June 10, 2026 at 6:52 am

    Is this what you mean?

    $('.simpleCart_checkout btnDownload').hide(); //hide your element upon intial page load
    
    $('#shippingselect').change(function() {
       if ($(this).val() != "nothing") {
          $('.simpleCart_checkout btnDownload').show(); //show element if shipping option selected
       } else {
          $('.simpleCart_checkout btnDownload').hide();
       }
    });
    

    AFAIK it is bad practice to have spaces in class/id names.

    It would be better in my opinion to disable/enable the button instead of hiding or showing it.

    $('.simpleCart_checkout btnDownload').attr('disabled', true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0 with haml and sass: I Would like to link an external
I'm using the js cart simpleCart but am having a simple issue.. I have
Using Jenkins or Hudson I would like to create a pipeline of builds with
I am using SimpleCart Js and am wondering would it be possible to make
Using android 2.3.3, I have a background Service which has a socket connection. There's
Im using simpleCart.js to build a simple, low-trafic, low product count, shopping cart. It's
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo

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.