Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2004
    Posts
    101
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Hide Paypal "view cart" button until something added to cart

    I am about to create a CSS class that will be a box containing a Paypal "View Cart" button. I want the DIV containing this class to be hidden if until someone adds something to their cart, but I'm not sure how to go about it.

    Thanks for any help.

  • #2
    New Coder
    Join Date
    Apr 2005
    Location
    Burnaby, BC, Canada
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello,

    You will have to do something like this once something was added to the cart.

    document.getElementById ( ~~The Div ID Goes HERE ~~).style.visibility = 'visible';

    If you would like to hide it then

    document.getElementById ( ~~The Div ID Goes HERE ~~).style.visibility = 'hidden';
    'Programming is the only artform that fights back!'


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •