470,596 Members | 1,144 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

Jquery tooltipster plugin problem to work sript

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
0 1122

Post your reply

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

Similar topics

1 post views Thread by Raaijmakers, Vincent (IndSys, GE Interlogix) | last post: by
Fary4u
10 posts views Thread by Fary4u | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.