craigsworks.com - Support Forum

Full Version: Using qTip on checkbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,

I'm trying to attach some tooltips to checkboxes on my page, yet it just doesn't show. I tried both with and without the
JS Code
position: { target: 'mouse' }}
but both fail.

Thanks for your help in advance.

Ray.
Hi again RayRay,

could you provide me with the rest of the code your using? As well as the HTML code of the elements you're trying to create the tooltips on? Thanks.
Thanks Craig for the response. Here is my testing code, which fails in both FF3 and the buggy IE7. Note that something does show up over the button, but nothing on checkbox.

JS Code
<html>
<head>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.qtip-1.0.0-beta2.min.js"></script>
</head>
<body>
   <input type="button" value="show a tip on me"/>
   <input type="checkbox" value="show a tip on me"/>   
   <script type="text/javascript">
      $(document).ready(function() {
         $("input").qtip({
            content: {
               text: "Something here...",
               title: {
                  text: "qTip"
               }
            },
            position: {
               target: 'mouse'
            }
         });
      });
   </script>
</body>
</html>


It would be very helpful if I can display a description over the checkbox on my page. Thanks so much for the plugin. Big Grin
Seems to be yet another problem caused by the selector bug... for now use the each() method to apply tooltips to multiple elements. Really need to roll out beta3 soon that fixes this!

JS Code
$(document).ready(function()
{
   $("input").each(function()
   {
      $(this).qtip({
         content: {
            text: "Something here...",
            title: {
               text: "qTip"
            }
         },
         position: {
            target: 'mouse'
         }
      });
   });
});
Thanks Craig.

I've updated to beta3.1 (the min version) now. However, the behavior is still not as expected.
For IE, the code runs but when I mouse over the checkbox, an error message is thrown saying:
Line: 62
Error: 'pageX' is null or not an object

It works fine in FF without the error. For Opera and Safari, nothing show up.

Please advice the remedy. Thanks a lot!

craig Wrote:Seems to be yet another problem caused by the selector bug... for now use the each() method to apply tooltips to multiple elements. Really need to roll out beta3 soon that fixes this!

JS Code
$(document).ready(function()
{
   $("input").each(function()
   {
      $(this).qtip({
         content: {
            text: "Something here...",
            title: {
               text: "qTip"
            }
         },
         position: {
            target: 'mouse'
         }
      });
   });
});
Reference URL's