I am new jQuery, playing around with it. I would like text box when I click button but it doesn't work in that way.
<input type=text id=txt></input>
<input type=button id=btn value="Click Me"></input>
$document.ready(function() {
$("input#btn").click(function() {
$("input#txt").hide();
});
});
$(document).ready(function(){
$("input#btn").click(function(){
$("input#txt").hide();
});
});
missed the ()
around document
you can use the short cut also like
$(function(){
//your code here
});
There is no such thing as $document.ready(
Try doing $(document).ready(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With