Search code examples
jqueryjquery-uiasp.net-mvc-4tooltip

Tooltip not working jquery UI


I'm trying to load jQuery UI tooltips into a web page within an MVC4 view but I'm getting the error:

Uncaught TypeError: Object [object Object] has no method 'tooltip'

I'm using jQuery 1.9.1 and jQuery-UI 1.10.2 which as far as I know should allow me to use tooltips? Looking at the Sources tab in Chrome I can see the jQuery and jQuery-UI JavaScript files as well as the jQuery-UI css file.

Here's the markup I'm using:

<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.10.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/TableCreationScript.js"></script>

<script>
    $(function () {
        $(document).tooltip();
    });
</script>

Am I missing something?


Solution

  • Thanks for the help, OhgodWhy's console comment led me to this answer: MVC4 jQuery UI does not work

    And it now works.