0 replies
I have swapping div's. When I click the "#inactive" id, the "#active-page" should disappear and the "#inactive-page" should appear. Moreover, the "#active" id should become the "#inactive" id and vice versa. I have used swapping id's =>"#inactive-page-swap" with the qualities of "#inactive-page" and "#active-swap" with qualities of "#active".

THE PROBLEM IS - when I click the "#inactive" id, the "#active-page" disappears but the "#inactive-page" does not appear.

<script>
$(document).ready(function(){
$("#inactive").click(function(){
$(#inactive).attr("id","active-swap");
$("#active").attr("id","inactive");
$("#active-swap").attr("id","active");


$("#active-page").attr("id","inactive-page-swap",function(){
$("#inactive-page").attr("id","active-page");
$("#inactive-page-swap").attr("id","inactive-page");
});
});
});
</script>
#jquery #problem

Trending Topics