I am learning how to use Bootstrap and would like to know how to dynamic show a popover against an input field within a form. I have tried the following but it did not work.
<script type="text/javascript">
$('input').one('focus', function() {
var id=$(this).attr('id');
$('input[id='.id.']').popover({'trigger':'focus''});
});
</script>
am trying to avoid having separate events for every input field.
here is the HTML that i am using to manipulate
<input type="email"
name="email"
id="email"
data-title="E-Mail Address"
data-content="E-Mail address"
data-alignment="right"/>
All help appreciated.
Try this:
I haven’t test it, anyway.