0

I am trying to bind an event handler to a form. The problem is I don't control the liquid/HTML this is written in. I just have access to it. Because of this the form could have any id or class but will always have the same action. The HTML looks like this:

<form action="/cart" method="post" novalidate class="could be anything">

I do have the submit button I could also bind too, but it falls into the same category, its always going to submit but other than that the id, class, name and text could be just about anything.

<button type="submit" id="checkout" name="checkout" class="btn">{{ 'cart.general.checkout' | t }}</button>

I'm using jQuery to select the element.

Thanks for the help

ToddT
  • 3,084
  • 4
  • 39
  • 83

0 Answers0