| 1 |
// $Id$
|
| 2 |
|
| 3 |
$(document).ready(function(){
|
| 4 |
|
| 5 |
// Add onclick handler to checkbox for adding a CAPTCHA description
|
| 6 |
// so that the textfields for the CAPTCHA description are hidden
|
| 7 |
// when no description should be added.
|
| 8 |
$("#edit-captcha-add-captcha-description").click(function() {
|
| 9 |
if ($("#edit-captcha-add-captcha-description").is(":checked")) {
|
| 10 |
// Show the CAPTCHA description textfield(s).
|
| 11 |
$("#edit-captcha-description-wrapper").show("slow");
|
| 12 |
}
|
| 13 |
else {
|
| 14 |
// Hide the CAPTCHA description textfield(s).
|
| 15 |
$("#edit-captcha-description-wrapper").hide("slow");
|
| 16 |
}
|
| 17 |
});
|
| 18 |
// Hide the CAPTCHA description textfields if option is disabled on page load.
|
| 19 |
if (!$("#edit-captcha-add-captcha-description").is(":checked")) {
|
| 20 |
$("#edit-captcha-description-wrapper").hide();
|
| 21 |
}
|
| 22 |
|
| 23 |
});
|