I am having a challenge.
I have 2 divs
, one set to display:none;
in the css when the page loads
I have two corresponding links. When the user clicks on
Are you deadset on jquery? This can be done simply with normal old JavsScript.
function switchVisible() {
if (document.getElementById['div1'].style.visibility == 'visible') {
document.getElementById['div1'].style.visibility = 'hidden';
document.getElementById['div2'].style.visibility = 'visible';
}
else {
document.getElementById['div1'].style.visibility = 'visible';
document.getElementById['div2'].style.visibility = 'hidden';
}
}
Then have in your link1: