I have about 20 forms in my web page
<form id="post_comment_1" class="post_comment" action="cmt.php" method="post">
// form inputs
</form>
.......
<form id="post_comment_20" class="post_comment" action="cmt.php" method="post">
// form inputs
</form>
Now, I have to track the form submit using javascript. if there is only one form having id (post_comment) I can track it like this
$("#post_comment").submit(function(event){
// function statements
});
But I can not do this because I have about 20 forms on one page. What is the efficient way to have an event listener on each of the form submit??