Componete Popover - Submit does not work

Asked

Viewed 67 times

0

Hello!

I have the following Pover, but when I start Submit, nothing happens.

Can you help me ?

$(function() {
        $('a[rel=popover]').popover({
        html: 'true',
		title: 'Título popover',
    placement: 'right',
    content : function() {
        return $('#popover-content').html();
    }
    });
});

$(document).on('click', 'button#abrir', function () {
    $('a[rel=popover]').popover('show');
});
<a rel="popover" role="button" id="abrir" class="btn btn-default btn-flat" title="Título" >
	<i class="fa fa-plus"></i>							
</a>

<div id="popover-content" style="display: none" >
	<div class="row">
		<form id="form" name="form" method="post" action="pagina_teste.php">
		    <div class="form-group col-sm-12">
		        <label for="nome">Nome</label>
			    <input type="text" id="nome" name="nome" class="form-control" autocomplete="off" autofocus placeholder="Nome" value="<?php echo set_value('nome'); ?>" >
			</div>
			<div class="form-group col-sm-12">
		        <label for="validade">Validade</label>
			    <input type="text" id="validade" name="validade" class="form-control" autocomplete="off" autofocus placeholder="00/00/00000" value="<?php echo set_value('validade'); ?>" >
			</div>
			<div class="col-md-12" style="">
			    <div class="input-group pull-left" >
                    <button type="submit" class="btn btn-primary btn-flat pull-left">
					    <i class="fa fa-check"></i>										
	    			</button>
		        </div>
				<div class="input-group pull-right" style="">
					 <button type="button" id="fechar" class="btn btn-default btn-flat" rel="popover">
						<i class="fa fa-times"></i>
				    </button>
                </div>
		    </div>
		</form>
	</div>
</div>

  • What library are you using for Popover?

  • For the code I put here, I did not use any library except . js boostrap Popover x. http://demos.krajee.com/popover-x E also failed!

  • @Wagnerson you know that Bootstrap depends on jQuery, right? You’re including the jQuery library before the Bootstrap script?

  • @Renan, This was only in the example but in the project I’m developing! The jQuery library is being called later.

  • @Wagnerson ok, there is some error in the console?

  • @Renan, nothing comes up!

  • Try creating a playable example then, because I tested and worked normally: fiddle.

  • @Renan, a question! Change something if the object is created in a modal ? Because the same code does not work in the modal, but in a blank page, it worked.

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.