Question

I am trying to use the jQuery tooltip, which was working before, however I am getting this uncaught type error in the Console in the following line:

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

code:

<title></title>
        <link href="Styles/MainMaster.css" rel="stylesheet" type="text/css" />
    <script type='text/javascript' src='/js/jquery.js'></script>
    <script type='text/javascript' src='/js/jquery.simplemodal.js'></script>
      <script type='text/javascript' src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
        <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
      <script type="text/javascript">
          $(function () {
              $("img[title]").tooltip();
          });
    </script>
        <link href="Styles/PopUpWindow.css" rel="stylesheet" type="text/css" />
        <script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
        <asp:ContentPlaceHolder ID="head" runat="server">
        </asp:ContentPlaceHolder>

What could have I done wrong?

Was it helpful?

Solution

The problem is with your scripts conflicting.

You should organise your scripts like:

   <title></title>
    <link href="Styles/MainMaster.css" rel="stylesheet" type="text/css" />
    <script type='text/javascript' src='/js/jquery.js'></script>
    <script type='text/javascript' src='/js/jquery.simplemodal.js'></script>
    <script type='text/javascript' src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("img[title]").tooltip();
        });
    </script>
    <link href="Styles/PopUpWindow.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top