Thursday, May 14, 2015

Tooltip example - Password strenght,characters in password

<html>
<head>
 <style>
 #foo {
position: absolute;
display: none;
background: White;
border: 1px solid #CCCCCC;
margin-left:3px;
margin-left:4px;
}
          </style>
 <script src="jquery-1.10.2.min.js"></script>

</head>
<body>
  <img class="helpIcoPassword" src="../App_Themes/RxWiki/images/help_icon.png"
            style="padding-right: 5px; cursor: help;" data-tooltip="#foo" /></span>

<div id="foo">
              <span style="color:red;font-size:12px">&nbsp;&nbsp; Password needs to meet the following requirements: <br />
                  &nbsp;&nbsp 1 . 8-20 characters. &nbsp;&nbsp <br />
                   &nbsp;&nbsp 2 . Should have at least 1 uppercase and 1 lowercase characters (A-Z, a-z).  &nbsp;&nbsp
                  <br />
                  &nbsp;&nbsp 3 . Should have at least 1 numeric characters (0-9). &nbsp;&nbsp
                  <br />
                   &nbsp;&nbsp 4 . Should have at least 1 special character (=.*[@#$%/!^&+|?<>,~`;:{}-]). &nbsp;&nbsp</span>
           </div>
    <script>

        $(".helpIcoPassword").hover(function (e) {
            $($(this).data("tooltip")).css({
                left: e.pageX + 1,
                top: e.pageY + 1
            }).stop().show(100);
        }, function () {
            $($(this).data("tooltip")).hide();
        });
    </script>

</body>
</html>

No comments:

Post a Comment