Hi. i am trying to show a hidden element using a button. but i want to make it so that everytime the button is clicked the hidden element get shown that same amount as button clicked.
example:
<input type="button" value="Click me" id="clickme">
<input type="text" id="textbox">
<script>
$(document).ready(function()
{
var element = $("#textbox").hide();
var count = 0;
$("#clickme").on("click", function()
{
count++;//count button clicked
var elem = element.clone();
//then the element will be cloned same amount as button click, stuck here
});
});
</script>
well I'm stuck there. is the approach wrong? do i use a loop or something? TIA