услышать Мой логин и код входа в систему, я использую Asp.net единственное действие для входа в систему и входа в систему, как изменить класс активной вкладки на то, когда я нажимаю «Регистрация». Приходит содержимое вкладок SiginUp и нажимается кнопка «Вход»..
<a href="@Url.Action("SignInSigInUp","Home", new {})" data-toggle-modal="modal" id="btnsignup" class="btn">SignUp</a>
<a href="@Url.Action("SignInSigInUp","Home", new {})" data-toggle-modal="modal" id="btnLogin" class="btn">Login</a>
$(function() {
var tab = $('.tabs h3 a');
tab.on('click', function(event) {
event.preventDefault();
tab.removeClass('active');
$(this).addClass('active');
tab_content = $(this).attr('href');
$('div[id$="tab-content"]').removeClass('active');
$(tab_content).addClass('active');
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<body>
<!-- LOGIN MODULE -->
<div class="login">
<div class="wrap">
</div>
<!-- LOGIN FORM -->
<div class="user">
<div class="form-wrap">
<!-- TABS -->
<div class="tabs">
<h3 class="login-tab"><a class="log-in active" href="#login-tab-content"><span>Login<span></a></h3>
<h3 class="signup-tab"><a class="sign-up" href="#signup-tab-content"><span>Sign Up</span></a></h3>
</div>
<!-- TABS CONTENT -->
<div class="tabs-content">
<!-- TABS CONTENT LOGIN -->
<div id="login-tab-content" class="active">
<form class="login-form" action="" method="post">
<input type="text" class="input" id="user_login" autocomplete="off" placeholder="Email or Username">
<input type="password" class="input" id="user_pass" autocomplete="off" placeholder="Password">
<input type="checkbox" class="checkbox" checked id="remember_me">
<label for="remember_me">Remember me</label>
<input type="submit" class="button" value="Login">
</form>
</div>
</div>
<!-- TABS CONTENT SIGNUP -->
<div id="signup-tab-content">
<form class="signup-form" action="" method="post">
<input type="email" class="input" id="user_email" autocomplete="off" placeholder="Email">
<input type="text" class="input" id="user_name" autocomplete="off" placeholder="Username">
<input type="password" class="input" id="user_pass" autocomplete="off" placeholder="Password">
<input type="submit" class="button" value="Sign Up">
</form>
</div>