How to add a class to a form tag that only present on click event? For example: I do have this...
<p>Below is a form: <span>show form</span></p>
<div class="container"></div>
when user clicks the "show form", jQuery will add a new form inside the class "container"
<p>Below is a form:</p>
<div class="container">
<form>
<-- some code here -->
</form>
</div>
note: The form still does not exist on first page load. It will only shows up when a user clicks on the span. Is there a way wherein the jQuery will just load after the form shows up?
This is how I plan to make it on jQuery, but it don't work, please correct this...
$("span").click(function(){
$(".container form").ready(function(){
$(this).addClass("active");
})
})
Thank you.