Hello
I'm using KendoUI Tooltip and attach them by class name, what works fine. There are now situations I have to hide Tooltips. So therefore I thought I can use the hide function of Tooltip but it hides its element as well:
<!DOCTYPE html>
<html>
<head>
<meta charset=
"utf-8"
>
<title>Tooltip hide test</title>
<script src=
"http://code.jquery.com/jquery-1.9.1.min.js"
></script>
<link rel=
"stylesheet"
href=
"http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css"
>
<script src=
"http://kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"
></script>
<script>
$(document).ready(
function
() {
// Attach tooltip to all elements with class = mytooltip
$(
".mytooltip"
).kendoTooltip({ content:
'Enter something here'
});
// Hide tooltip on clicking button
$(
"#hideTooltip"
).click(
function
() {
$(
".mytooltip"
).kendoTooltip().hide();
});
});
</script>
</head>
<body>
<div id=
"container"
>
<input type=
"text"
id=
"inputfield"
class=
"mytooltip"
>
</div>
<button id=
"hideTooltip"
style=
"margin-top: 30px;"
>Hide tooltip</button>
</body>
</html>
This code sample does show an input element on which a Tooltip is attached, works fine. If you then press the button that should hide the Tooltip it also hides the input element. What am I doing wrong?