Qtip on input focus
I want to show Qtip when input get focus. Here is my code:
<script>
function inputQtip(){
alert("Test");
$('#aerobot[title]').qtip({
position: {
my: 'right center',
at: 'left center',
target: $('.aerobot'),
},
show: {
when: {
target: $('#ae开发者_高级运维robot'),
event: 'focus',
},
}
});
}
inputQtip();
</script>
And its not working. Alert popups. So function is executing. What is wrong with this qtip ? :(
there's nothing wrong with this code. you just forgot to wrap it in document.ready function.
$(document).ready(function() {
inputQtip();
});
精彩评论