Recently I had to build a ‘smart booking form’ for a group of hotels. The website is made on Twitter’s Bootstrap and is fully responsive.
Troubles began when I had to ask the guest for his children’s age, only if he’s telling the form he has children.
Here the Twitter Popover feature comes very handy: if the guest selects one or more children a popover will be shown.
The hard part is to understand when this popover have to be closed.
To make the guest the most comfortable possible let’s put a nice X on the top right corner of the popover.
This is how I added a close button to Twitter Bootstrap Popover in javascript:
Please be advise this code must be inserted in document ready function.
And this is the HTML:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more