var DisplayDetailWindow = function (e){ // console.log('DisplayDetailWindow'); var elTrigger = $(e.relatedTarget) // element that triggered the modal var nCellID = elTrigger.data('cell-id') // grab the cell id var modDetail = $(this) // grab the modal //grab the details page and display it in the modal $.get('/includes/dspGridCellDetails.cfm?nConferenceGridCellID=' + nCellID, function(data) { modDetail.find('.modal-body').html(data) }, 'html') }; var SwipeLeft = function (e){ $('#tabsMobileGrid > .active').next('li').find('a').trigger('click'); }; var SwipeRight = function (e){ $('#tabsMobileGrid > .active').prev('li').find('a').trigger('click'); }; var ToggleDetails = function (e){ $(e.currentTarget).next('.panel-body').toggle(); }; $(document).ready(function(e) { $('.panel-heading').click(ToggleDetails); $('.panel-heading').click(); $('#divMobileGrid').on('swipeleft',SwipeLeft); $('#divMobileGrid').on('swiperight',SwipeRight); $('#modDetail').on('show.bs.modal', DisplayDetailWindow) });