Form check boxes and Forms

Bit of a newbie question but I've got a form and I want bits of the
form to appear when a checkbox is clicked.

So for example I have a query such as do you want to have a link
attached to this post which is a tick box, then I have another field
which contains the text box for the link to go in.

So I want the link text box to appear when the checkbox is clicked.
Can anyone help?

using jquery, you can use something like the following

= check_box :object, :check

= text_field :object, :text, :style => ‘display:none’