jquery - Bootstrap Popover inside dynamic Select Option -


i'm trying popover creates content dynamic , wants interactuate option selected. let me explain: have select , 1 of option has pop popover have form 'accept' , 'cancel' buttons. first of all, doesn't show on page, , second 1 (trying in w3schools editors @ last can show popover) cancel button doesn't hide current popover.

this jsfiddle popover working not closing (only has console.log try show 'hello' doesn't work)

and jsfiddle trying popover when 'no disponible' selected.

anyone can explain why doesn't work of attempts? thank in advance

here go solution first half https://jsfiddle.net/c3yq1o43/3/ . closing of popover on clicking cancel button

$(document).ready(function(){    	 closepop = function(){     	  $('[data-toggle="popover"]').popover('hide');     }                var pop = $('[data-toggle="popover"]').popover({      html:true,      content: function(){      	return "<form name='statusform'>"+          			"<div class='form-group'>"+                      	"<textarea class='form-control' name='estado' placeholder='motivo de la no-disponibilidad' required></textarea>"+                      "</div>"+          			"<button class='button btn btn-success' type='button'>aceptar</button>"+                      "<button class='button btn btn-success' type='button' onclick='closepop()'>cancelar</button>"+                  "</form>"      }});                      });
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>    <body>    <div class="container">      <h3>popover example</h3>      <p>popovers not css-only plugins, , must therefore initialized jquery: select specified element , call popover() method.</p>      <a href="#" data-toggle="popover" title="popover header">toggle popover</a>    </div>  </body>

i trying make second half of question. little bit of confusion..

on selection of 'no disponible' option want show popover???


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -