<html>
<head>
<title>test</title>
<style type="text/css">
.register-block-hidden {display:none;}
.register-block-visible {display:block;}
.login-block-hidden {display:none;}
.login-block-visible {display:block;}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$(".register").click(function(){
$(".login-block-visible").removeClass('login-block-visible').addClass('login-block-hidden');
$(".register-block-hidden").removeClass('register-block-hidden').addClass('register-block-visible');
});
$(".login").click(function(){
$(".register-block-visible").removeClass('register-block-visible').addClass('register-block-hidden');
$(".login-block-hidden").removeClass('login-block-hidden').addClass('login-block-visible');
});
});
</script>
</head>
<body>
<div class="register-block-hidden">Content 1</div>
<div class="login-block-hidden">Content 2</div>
<div class="register">Show Content 1</div>
<div class="login">Show Content 2</div>
</body>
</html>
$( function () {
$( '.register-block-hidden' ).show();
$( '.register' ).on( 'click', function() {
$( '.login-block-visible' ).fadeOut( 500 );
$( '.register-block-hidden' ).fadeIn( 500 );
});
$( '.logir' ).on( 'click', function() {
$( '.login-block-visible' ).fadeIn( 500 );
$( '.register-block-hidden' ).fadeOut( 500 );
});
});