Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  24] [ 7]  / answers: 1 / hits: 122924  / 7 Years ago, tue, january 31, 2017, 12:00:00

I have a project based in Spring Web model-view-controller (MVC) framework. The version of the Spring Web model-view-controller (MVC) framework is 3.2.8 deployed on a WebLogic Server Version: 12.1.2.0.0



I have this error loading 1 JSP




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




This is everything I load and I checked 1 by 1 and all of them are loaded



<link href=/tdk/styles/bootstrap.css type=text/css rel=stylesheet>
<link href=/tdk/styles/admin.css type=text/css rel=stylesheet>
<link href=/tdk/styles/jquery.dataTables.css type=text/css rel=stylesheet>
<link href=/tdk/styles/dataTables.bootstrap.css type=text/css rel=stylesheet>
<link href=/tdk/styles/slides.css type=text/css rel=stylesheet>

<script src=/tdk/scripts/jquery.min.js type=text/javascript></script>
<script src=/tdk/scripts/bootstrap.js type=text/javascript></script>
<script src=/tdk/scripts/jquery.dataTables.js type=text/javascript></script>
<script src=/tdk/scripts/dataTables.bootstrap.js type=text/javascript></script>
<script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js type=text/javascript></script>
<script src=https://code.jquery.com/ui/1.12.1/jquery-ui.js></script>


<script type=text/javascript>
$(document).ready(function() {
$('[data-toggle=tooltip]').tooltip();
var selected = [];
var table = $('#example').DataTable({
dom: '<top>rt<bottomlp><clear>',
autoWidth: false,
paging: false,
scrollX: false,
scrollY: 300,
scrollCollapse: true,
rowCallback: function(row, data) {
if ($.inArray(data.DT_RowId, selected) !== -1) {
$(row).addClass('selected');
}
},
columnDefs: [{
targets: 'nosort',
orderable: false
}, ]
});
$('#example tbody').on('click', 'input', function() {
$(this).closest(tr).toggleClass('selected');

if ($(this).is(':checked')) {
var theNameOfSelectedProduct = $(this).closest(tr).find(td.productname).text();
$('#selecteddevices').val($('#selecteddevices').val() + + theNameOfSelectedProduct);
$('#actions4devices button').removeAttr(disabled);
} else {
var theNameOfSelectedProduct = $(this).closest(tr).find(td.productname).text();
$('#selecteddevices').val($('#selecteddevices').val().replace(theNameOfSelectedProduct, ));
if ($('#selecteddevices').val().trim().length == 0) {
$('#actions4devices button').not('.pull-right').attr(disabled, disabled);
}
}
});
$('#refusedevicesButtonId').on('click', function() {
$('#theRefuseFile').show();
});
});
</script>



More From » jquery

 Answers
76

Can we see where you're using $.tooltip() ? It's possible that it occurs somewhere before the jQuery UI embed line. So try re-arranging your script includes so jQuery is first, jQuery UI is second, then along through the rest.


<script src="/tdk/scripts/jquery.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="/tdk/scripts/bootstrap.js" type="text/javascript"></script>
<script src="/tdk/scripts/jquery.dataTables.js" type="text/javascript"></script>
<script src="/tdk/scripts/dataTables.bootstrap.js" type="text/javascript"></script>

Hard to know without seeing your full code and knowing which files contains your calls to $.toolTip().


One other quick attempt would be to substitute jQuery for $ where you're using, i.e.:


$(".tips").toolTip()


would become:


jQuery(".tips").toolTip()


[#59128] Monday, January 30, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kieraelsies

Total Points: 718
Total Questions: 103
Total Answers: 104

Location: England
Member since Sun, May 21, 2023
1 Year ago
kieraelsies questions
Tue, Aug 3, 21, 00:00, 3 Years ago
Tue, Feb 23, 21, 00:00, 3 Years ago
Thu, Nov 12, 20, 00:00, 4 Years ago
Wed, Sep 9, 20, 00:00, 4 Years ago
Mon, Sep 16, 19, 00:00, 5 Years ago
;