html - Bootstrap 3: How to close popup using jQuery? -
in code there 2 popup windows. first login , second reset password. link second popup inside of login popup. want automatically close login popup when click link forgot password.
<a href="#" data-toggle="modal" data-target=".loginform">login</a> <!- login popup start--> <div id="login" class="modal fade loginform" tabindex="-1" role="dialog" aria-labelledby="mylargemodallabel" aria-hidden="true"> .... <label> <input type="checkbox"><span style="font-size:12px;display:block;">remember me</span> </label> </div> </div> </div> </div> <div class="modal-footer"> <a data-toggle="modal" data-target=".forgotpassword" href="#" style="float:left;font-size:14px;">forgot password</a> <button type="button" class="btn btn-default" data-dismiss="modal">close</button> <button type="button" class="btn btn-primary">login</button> </div> </div> <!-- /.modal-content --> </div> </div> <!- popuplogin end--> <!- popup forgot password start--> <div id="forgot" class="modal fade forgotpassword" tabindex="-1" role="dialog" aria-labelledby="mylargemodallabel" aria-hidden="true"> ....... <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">close</button> <button type="button" class="btn btn-primary">reset</button> </div> </div> <!-- /.modal-content --> </div> </div> <!- popup end-->
keep id forget password link , on click $('#login').modal('hide');
$("#forgotpass").click(function(){ $('#login').modal('hide'); });
Comments
Post a Comment