In my application a
jsp page is there and when the jsp is getting loaded for the first time a j Query method is getting invoked and it is displaying the expand/collapse button.If I click on the expand button then it is displaying some message and changed to collapse and if I click on collapse the message is getting disappeared and the button itself is changed to expand again.
Please refer the attached image.
The jQuery code is given below
and in the jsp expand/collapse button display is like below
Now what I want is that using
javaScript I want to programmatically make a decision that which button (expand or collapse) is hidden and which one is visible.
Please help me out