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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -