<button onclick="productAddToCartForm.submit(this)" class="button btn-cart" title="Add to Cart" type="button"><span><span>Add to Cart</span></span></button>
the original js code:
var productAddToCartForm = new VarienForm('product_addtocart_form');
productAddToCartForm.submit = function(){
if (this.validator.validate()) {
this.form.submit();
}
}.bind(productAddToCartForm);
The above is the normal step. which is click the button, then submit the form. now, i want to add one step before the form is submitted. the step is. when click the button, it will pop up a dialog. there are some content on it. when close the dialog. then submit the form.
1, first i think i shoulf use jquery in
productAddToCartForm.submit = function(){....}
.if the page have loaded the jquery library.but i don’t know how to add jquery code in the function. thank you
pop up dialog effect