0

I am trying to get custom tooltip over image. but during run time it says "method or property tooltip not defined" here is my code

<script src="/full/jquery.tools.min.js" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("#content img[title]").tooltip();

    });

</script>

<style type="text/css" >

.tooltip 
    {    
        display:none;
        background:transparent url(Images/blackarrow.png);    
        font-size:12px;    
        height:70px;    
        width:160px;    
        padding:25px;    
        color:#eee;  
    }</style>
</asp:Content>


    <div id="content"> <img alt="" src="Images/help1.png" title="Your help comes here" /></div>
3
  • Did you include the plugin in the head section? Seems that not. Commented Jun 26, 2012 at 22:03
  • yes i did. I even tried same thing in different project with no master page and getting plugiun locally..still no luck. Commented Jun 26, 2012 at 22:09
  • Are you including the plugin after include the JQuery? Commented Jun 26, 2012 at 22:34

1 Answer 1

1

Try to include the plugin directly from the developer, just for test. If works, there is some problem with your code.

I've removed the [title] from <img>, if you really need it, put it again.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="http://jquery.bassistance.de/tooltip/jquery.tooltip.js" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("#content img").tooltip();

    });

</script>

<style type="text/css" >

    #tooltip {
    width:160px;
    height:70px;
    background:transparent url(Images/blackarrow.png) #eee;
    z-index: 3000;
    border: 1px solid #111;
    opacity: 0.85;
    font-size:12px;    
    padding:25px;    
    color:#eee;  
    position: absolute;
    }
    #tooltip h3, #tooltip div { margin: 0; }


</style>

<div id="content">
    <img alt="" src="Images/help1.png" title="Your help comes here" />
</div>
Sign up to request clarification or add additional context in comments.

2 Comments

I tried giving direct from developer too but still I ll try one more time as given above n update u.
@NandiniT, Maybe your JQuery has some problem, i've done an update in the answer loading the JQuery from Google Library, try to do this to see what happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.