// conornote 2019Apr16: update modal top to: the button.top - button.height + 5px for padding // update the modal left to: button.left - 1/2 modal.width + half button.width jQuery("#newbook_guest_popup_content").on("shown.bs.modal",function() { var guestButton = jQuery("#guests_picker"); var offset = guestButton.offset(); var modalElement = jQuery("#newbook_guest_popup_content .newbook-modal-content"); modalElement.offset({ top: (offset.top + guestButton.innerHeight() + 5), left: (offset.left - (modalElement.innerWidth() / 2) + (guestButton.innerWidth() / 2)) }); });
jQuery("#newbook_guest_popup_content").on("hide.bs.modal",function() { update_guests();load_availability(); });
All prices shown are in AUD (Australian Dollars).