'Can I hide div class in Payment page Shopify?
I have this code its been impleted in the Shopify checkout (Payment) Page ,unfortunatly Shopify wont allow editing this page ,but you can add some css or html code in the shopify checkout settings. checkout settings shopify
I need to hide this div class PayPal
<div class="radio-wrapper content-box__row " data-gateway-group="express" data-gateway-name="paypal" data-select-gateway="37585059906" data-submit-i18n-key="complete_order">
<div class="radio__input">
<input class="input-radio" id="checkout_payment_gateway_37585059906" data-backup="payment_gateway_37585059906" aria-describedby="payment_gateway_37585059906_description" aria-controls="payment-gateway-subfields-37585059906" type="radio" value="37585059906" checked="checked" name="checkout[payment_gateway]">
</div>
<div class="radio__label ">
<label for="checkout_payment_gateway_37585059906" class="radio__label__primary content-box__emphasis">
<img alt="PayPal" class="offsite-payment-gateway-logo" src="//cdn.shopify.com/shopifycloud/shopify/assets/checkout/offsite-gateway-logos/paypal@2x-768388b0667bef1aa9a7cf02fa1cc2184c2915a90d4cdd62dde223f74f2acbfc.png">
<span class="visually-hidden">
PayPal
</span>
Can you tell me which code I can paste it in the style box shopify ?. I need to hide this element above.
Solution 1:[1]
let redBox = document.getElementById("targetElement");
let hideButton = document.querySelector("button");
hideButton.addEventListener('click', _ => {
redBox.style.display = 'none';
});
#targetElement{
width : 200px;
height : 200px;
background-color : red;
}
<div id="targetElement">
</div>
<button type="button">Hide</button>
You need to use "display : none" in div element you want to hide.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ABI |
