I have a simple question but don’t know exactly how to achieve this. All I know is that I have to use the click() function.
Basically, I have a div with the id #box1. I applied the CSS style overflow:auto so that there will be a vertical scroll-bar if the table length (a long table is inside #box1) exceeds the width of the div #box1.
Now I wanted to add a link below the div. The link should do the following:
- On-click, add the CSS for div
#box1fromoverflow:autotooverflow:visible - Simultaniously, while it changes the CSS above, the link should change to display a new link (the old one disappears) that will change CSS back to
overflow:autowhen clicked.
You can use
cssmethod.And instead of hiding/showing 2 different buttons, you can use
textmethod:http://jsfiddle.net/u6Nc8/