Question

I have 3 sections on a form which slideDown() when a checkbox is checked and slideUp() when the checkbox is unchecked.

In one part of the form i'm using a simple button to run a function.

If I uncheck the checkbox to slide the content up and then recheck it to slide the content back down again, the text in the button disappears and leaves me with a tiny button, which still works, but will not inform the user of what it does.

Any help would be great.

Thanks

Richard

Was it helpful?

Solution

Ok, so in my function to slide the content up I had the following line:

$("#" + section + " :input").val("");

It turns out that this not only clears the obvious fields, text etc, it also wipes out the button text.

I simply changed this line of code to:

$("#" + section + " :input[type='text']").val("");

Thanks for your prompt replies!

Richard

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top