Tabs Menu Using Javascript
I have a page with two tabs. These tabs do not contain text but images. now the thing is that when a tab is active, it contains different image and when it is inactive it contains different image. So there are a total of 4 images ( 1 Active state & 1 Inactive state for each tab).
Could anyone guide me with the desired code using Asp.net with HTML co开发者_开发技巧ntrols(not server controls), Javascript and css.
Thanks in advance
If you are not going to use jQuery (or similar) for this, then you can probably write your own JavaScript code. When the onclick or onfocus event is raised for switching between tabs (however you manage it), just call a function to change the src of the image on the active/inactive tabs.
You can either use JavaScript to hide the images or use a CSS sprite so when the tabs are active the css changes and shows the different images
精彩评论