Popover en Modal of Bootstrap 3.0.3 -
i have form in modal , when click in "send" must show popover word "thanks you", when click first time, popover not displayed, second time onwards , shows good.
my code here
$(document).on('submit', 'form#contact',function(event) { $('#submit').popover({ trigger:'click', content: 'gracias por tu opinion', placement: 'left' }); event.preventdefault(); });
jsfiddle : http://jsfiddle.net/gonzalesc/t348e/
something i'm doing wrong, because popover should show first time click thanks
what happends is, in first click, or submit, insert popover submit button :
$('#submit').popover({ trigger:'click', content: 'gracias por tu opinion', placement: 'left' });
with trigger : 'click'
. means, popover shown next time user clicks on submit button. show popover immediately, :
$('#submit').popover({ trigger: "manual", content: 'gracias por tu opinion', placement: 'left' }).popover('show');
change trigger manual
, , force popover shown .popover('show')
.
forked fiddle -> http://jsfiddle.net/lweyf/
Comments
Post a Comment