jquery pass value class

Posted by mckenzie on Stack Overflow See other posts from Stack Overflow or by mckenzie
Published on 2010-05-16T16:50:08Z Indexed on 2010/05/16 17:00 UTC
Read the original article Hit count: 279

Filed under:
        $(".hidee2").click(function() {
        var type = $(".st").val();
}

<form action="" method="POST"><input type="hidden" class="st" value="st"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span></span></div></form>

<form action="" method="POST"><input type="hidden" class="st" value="st2"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span></span></div></form>

<form action="" method="POST"><input type="hidden" class="st" value="st3"><div class="button">Room Status : Accepting Reservation <br /><span><span><a class="hidee2">Book Now!</a></span></span></div></form>

How do i get which book now! link user click? because i need to pass over the st value? is there any way to achieve this using jquery? currently, only st value is passed over

© Stack Overflow or respective owner

Related posts about jQuery