By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

Jquery tooltipster plugin problem to work sript

P: 1
I need help with tooltipster plugin i do not see need result :( The next script work, but error do not with tooltipster.

Expand|Select|Wrap|Line Numbers
  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
  2.            type="text/javascript"></script>
  3. <script src="http://jqueryvalidation.org/files/dist/jquery.validate.min.js"></script>
  4.  
  5. <style>
  6.     body{
  7.         margin-top: 100px;
  8.         margin-left: 20px;
  9.     }
  10. </style>
  11.  
  12.     <script type="text/javascript">
  13.         $(document).ready(function(){
  14.          $("form").validate({
  15.       rules : {
  16.         test : {
  17.           minlength: 3 ,
  18.           required: true
  19.         }
  20.       },
  21.       showErrors: function(errorMap, errorList) {
  22.         $.each(this.successList, function(index, value) {
  23.           return $(value).popover("hide");
  24.         });
  25.         return $.each(errorList, function(index, value) {
  26.           var _popover;
  27.           _popover = $(value.element).popover({
  28.             trigger: "manual",
  29.             placement: "top",
  30.             content: value.message,
  31.             template: "<div class=\"popover\"><div class=\"arrow\"></div><div class=\"popover-inner\"><div class=\"popover-content\"><p></p></div></div></div>"
  32.           });
  33.           // Bootstrap 3.x :      
  34.           //_popover.data("bs.popover").options.content = value.message;
  35.           // Bootstrap 2.x :
  36.           _popover.data("popover").options.content = value.message;
  37.           return $(value.element).popover("show");
  38.         });
  39.       }
  40.     });
  41.  
  42.         });
  43.  
  44.         </script>
  45.         <form action="" method="post">
  46.             <input type="text" name="test" id="test"/>
  47.         <input type="submit" name="submit">      
  48.     </form>
Sep 27 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.