I want to attach tooltip to my input field after it has been given to the browser. I am using the following, but it doesn't enter the second function wherein i have printed "Inside eventID javascript"
I am doing so because in my templates i am using {{ fields }} tag to display the input fields. If i specify the the html tag the default value specified in the model does not get displayed.
<script type = "text/javascript">
$(function (){
console.log("Test");
$('#id_eventID').onfocus = function () {
console.log("Inside eventDI javascript");
$(this).tooltip({title:"helloooo!"});
}
});
</script>