0

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>
4

1 回答 1

0

如果你想在 Django 中使用引导程序,我建议使用https://github.com/dyve/django-bootstrap3 (V3) 或https://github.com/dyve/django-bootstrap-toolkit (V2)。

关于工具提示:为什么不使用 tooltip.js http://getbootstrap.com/javascript/#tooltips

于 2013-11-17T09:47:06.257 回答