By array
I create forms with php
, each form has a input
text
which is hidden (hidden) , I want to show it by a button in each of those forms.
Similar to the Facebook posts that you have to click on the "Comment" button to see what is going on, and the Text inpux appears
This is my code jquery
.
$("#mosCom").click(function(){
$("#comend").show();
});
"moscom"
is the id of the buttons show in each form and "comend"
is the id of the hidden text input.
The problem is that all the forms have the same id I was thinking about creating an id with a "moscom1"
, "moscom2"
, but I wonder how I could select that id in general with jquery
and from there show the input text
corresponding% of that form.