1

is it possible to put a popover on a button (submit button) so when over over you get the pop over and when clicked it still does its job of submitting a form? all the examples I have seen require it to be a link.

does any one have any js fiddels of a pop over on a button, not a link styled to be a button.

4

1 回答 1

0

Here is a simple example: http://jsbin.com/akuhun/1

HTML:

<form id="aform" action="http://google.com/">
    <input type="submit" class="btn" data-toggle="popover" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">
</form>

JS:

$("[data-toggle=popover]").hover(function () {
    $(this).popover('show');
},function () {
    $(this).popover('hide');
}); 
于 2013-03-13T23:38:10.957 回答