| Automatically click link
|
almo136

msg:4509820 | 1:44 pm on Oct 19, 2012 (gmt 0) | I have the below code which shows a stock alert link on out of stock product pages:
if ($block->isShow()): ?> <p class="alertStock"><a <?php if (!$userLoggedIn): ?> rel="showStockPopupForm" lang="<?php echo $_product->getId() ?>" <?php endif; ?> href="<?php echo $this->escapeHtml($this->getSignupUrl()) ?>"><?php echo $this->__('Sign up to get notified when this product is back in stock'); ?></a></p> <?php endif; ?> I would like this link to get triggered automatically. How can I use jQuery to click this link on page load? Thanks!
|
lostdreamer

msg:4510718 | 10:30 am on Oct 22, 2012 (gmt 0) | something like this should do:
$(window).load(function() { $(".alertStock a").trigger("click"); });
|
|
|