Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: $(...).tooltip is not a function

I have gridview that is populated by jquery. Below is part of my code thats giving the above error:

var codes = $(this).find("Code").text();

 $("td", row).eq(6).html($(this).find("oTotal").text());
            if ($(this).find("Stock").text() == 'Y') {

                $("td", row).eq(7).html('<a href="#"  class="tooltip" title="This is my divs tooltip message!" id="' + codes + '" style="text-decoration:none">Y</a>');

                 $('#' + codes).live('click', function () {
                    $('#' + codes).tooltip();

                });
            }
            else {
                $("td", row).eq(7).html($(this).find("Stock").text());
            }

I am getting an error on $('#'+ codes).tooltip(); I have jquery.ui/1.8.22 and jquery/1.8.3.

like image 868
Sithelo Ngwenya Avatar asked Aug 16 '13 18:08

Sithelo Ngwenya


1 Answers

Try re-arranging your script includes so jQuery is first, jQuery UI is second, then along through the rest.

like image 182
Yogesh Avatar answered Sep 25 '22 02:09

Yogesh