You should not change the ids. But change the class attribute.
Moreover if you want to hide a div. You may consider to do that with Jquery .hide()
method like in the following code (or see my updates isfiddle):
<script language="javascript">
$(function(){
$("#inactive-page").hide();
$("#active").click(function(){
$("#active").attr("class","login-modal");
$("#active-page").show();
$("#inactive").attr("class","signup-modal");
$("#inactive-page").hide();
});
$("#inactive").click(function(){
$("#inactive").attr("class","login-modal");
$("#inactive-page").show();
$("#active").attr("class","signup-modal");
$("#active-page").hide();
});
});
</script>
And update your CSS with that:
#bottom-modal{
width:100%;
border-top:1px solid #666;
box-shadow:0px 1px #aaa inset;
padding: 15px 0 0 0;
font-size:14px;
color:#3a3a3a;
min-height:33px;
}
a{
float:left;
text-decoration:none;
padding:5px;
margin-left:39%;
border-radius:5px;
padding:5px;
}
.signup-modal{
background:#00a5f0;
border:1px solid #0084c0;
color:#fff;
outline:none;
}
.login-modal{
background-color:#e6e6e6;
color:#808080;
border:1px solid #d6d6d6;
outline:none;
}
#active-swap{
background:#00a5f0;
border:1px solid #0084c0;
color:#fff;
outline:none;
}
#inactive:hover{
background:#666;
color:#fff;
}
#inactive:active{
background:#333;
color:#fff;
}
PS: you forget the last </div>
in your jsfiddle. And you should not put the <script></script>
element in the jsfiddle's javascript window.