stuck Posted October 7, 2009 Report Share Posted October 7, 2009 i need to show a form only when a checkbox is ticked. Im guessing i need to use jquery to do this. Anyone know of a tutorial which explains this - or even better your advice. Quote Link to comment Share on other sites More sharing options...
BeeDev Posted October 7, 2009 Report Share Posted October 7, 2009 you CAN use jQuery indeed, but you dont NEED to use jQuery, just normal Javascript is fine. the normal way: say you have a checkbox, and the form you want to hide/show is contained inside a div with an id="myDiv" ..... then you need a function called showHide that takes an element/object as a paramer -> (this) Quote Link to comment Share on other sites More sharing options...
falkencreative Posted October 7, 2009 Report Share Posted October 7, 2009 I posted some of the code you would need to use to do this with jQuery. BeeDev is right though -- this could be simply done with regular javascript. Quote Link to comment Share on other sites More sharing options...
BeeDev Posted October 9, 2009 Report Share Posted October 9, 2009 Seemed a bit of overkill to include 55kb javascript lib (jQuery) just to hide/show a layer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.