Bootstrap Tooltip on input field elements
home
Run
screen_rotation
fullscreen
cloud_download
<html> <head> <title>Bootstrap Grid</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#name').tooltip({'trigger':'focus', 'title': 'Name is Required Field'}); $('#email').tooltip({'trigger':'focus', 'title': 'Name is Required Field'}); $('#password').tooltip({'trigger':'focus', 'title': 'Password is Required Field'}); }); </script> </head> <body> <div class="container" style="padding:50px;"> <form role="form"> <div class="form-group"> <label for="firstname">Name</label> <input type="text" name= "Name" class="form-control" id="name" placeholder="Enter Name"> </div> <div class="form-group"> <label for="email">Email</label> <input type="text" name="email" class="form-control" id="email" placeholder="Enter email"> </div> <div class="form-group"> <label for="Password">Password</label> <input type="password" name="password" class="form-control" id="password" placeholder="Enter Password"> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> </body> </html>
<html> <head> <title>Bootstrap Grid</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#name').tooltip({'trigger':'focus', 'title': 'Name is Required Field'}); $('#email').tooltip({'trigger':'focus', 'title': 'Name is Required Field'}); $('#password').tooltip({'trigger':'focus', 'title': 'Password is Required Field'}); }); </script> </head> <body> <div class="container" style="padding:50px;"> <form role="form"> <div class="form-group"> <label for="firstname">Name</label> <input type="text" name= "Name" class="form-control" id="name" placeholder="Enter Name"> </div> <div class="form-group"> <label for="email">Email</label> <input type="text" name="email" class="form-control" id="email" placeholder="Enter email"> </div> <div class="form-group"> <label for="Password">Password</label> <input type="password" name="password" class="form-control" id="password" placeholder="Enter Password"> </div> <button type="submit" class="btn btn-primary">Submit</button> </form> </div> </body> </html>
Copyrights@tutorialsplane.com