JSFiddle - React, Tailwind, and code Playground
by giorgitbs
HTML
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<div class="panel-body">
<form action="/VED" class="form-horizontal" method="post" role="form">
<div class="form-group">
<label class="col-md-2 control-label" for="G33">Код товара по ТН ВЭД России</label>
<div class="col-md-10">
<input class="form-control" id="G33" name="G33" type="text" value="" />
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="G021">ИНН отправителя</label>
<div class="col-md-10">
<input class="form-control" id="G021" name="G021" type="text" value="" />
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="G081">ИНН получателя</label>
<div class="col-md-10">
<input class="form-control" id="G081" name="G081" type="text" value="" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" class="btn btn-primary" value="Поиск" />
</div>
</div>
</form> </div>
<div id="pophead" class="hide">
This is the popover title.
</div>
<div id="content"...
JavaScript
$( "#G33" ).focus(function() {
//alert('test');
$('#G33').popover({
html : true,
title: function() {
return $('pophead');//'<div>This is the popover title.</div>';
//$(this).parent().find('.head').html();
},
content: function() {
return '<div><p>This is the popover content.</p></div>';
//$(this).parent().find('.content').html();
},
container: 'body',
placement: 'bottom'
});
//alert('test');
});