Bootstrap 3 Skeleton
This is a simple Bootstrap skeleton. You can fork it to get a ready to use Bootstrap fiddle.
HTML
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<a href="#" id="popover" class="button blue">Create</a>
<div id="popover-head" class="hide"><h4>Create</h4></div>
<div id="popover-content" class="hide">
<form method="post">
<p><input type="text" id="name" name="name"/></p>
<p><input type="text" id="tel" name="tel"/></p>
<input type="submit" id="submit"/>
</form>
</div>
CSS
body {
margin: 100px;
}
JavaScript
$('#popover').popover({
html: true,
placement: 'right',
title: function () {
return $("#popover-head").html();
},
content: function () {
return $("#popover-content").html();
}
});
$(document).on('submit','form',function(){
alert('form submitted');
//prevent -> return false
return false;
});
/*
$('form').submit(function(){
alert('form submitted');
return false;
});
*/