In my HTML table I am adding rows dynamically.
As can be seen in the above image, one of the columns (in each row) has a button (OpenPad) which I am using to increase the height of the textarea like this:
$('#'+ constructeIdQuesFld).height(65);
The aim of this arrangement is to conserve space. The result is as seen in the following image:
However, if I want to toggle the button action from the default textarea height to increased height and back to default, it is not happening. I have tried the toggle action using the following:
$('#'+ constructeIdQuesFld).toggle().height(65);
When the button OpenPad is clicked the 2nd time, the textarea is hidden completely, instead of reverting back to the default state. This is stated succinctly here:
The toggle() method toggles between hide() and show() for the selected elements.
Under the circumtances, how do I toggle between two states of the textarea (from default size to the intended one and back)?