我有以下 HTML
<div class="goto_step3">
<a href="<?= $this->sitePfx ?>/cart/paypal/" id="js_checkout_now" class="arrow">Checkout & Pay</a>
<? if($this->discountCodeErrorMessage): ?>
<p class="error discountError"><?= $this->discountCodeErrorMessage ?></p>
<? endif; ?>
<div class="discountCode fncFixedHeight <?= $this->has_discount ? 'redeemed': ''; ?>">
<? if(!$this->has_discount): ?>
<label for="inptdiscountcode">Enter discount code</label>
<input class='fncInpDiscountCode' id="inptdiscountcode" type="text" name="discount_code" value="" />
<? else: ?>
<? if(!(empty($this->discount['discount_message']))): ?>
<?= $this->discount['discount_message']; ?>
<? else: ?>
Voucher code redeemed
<? endif; ?>
<? endif; ?>
在 DomReady 上,我希望制作 mootools ,.discountCode
display:none
并且.goto_step3 p
display:none
在单击我希望display:none
成为的链接时display:block
任何帮助都会很棒