Disable Twitter Bootstrap modal

I read Bootstrap JS instructions and this code disables Twitter Bootstrap motif:

$('#myModal').on('show', function (e) { if (!data) return e.preventDefault() // stops modal from being shown }) 

However, when you click modality, it does not open the object (the image in this case, using the Bootstrap image gallery: https://github.com/blueimp/Bootstrap-Image-Gallery ). It simply disables the click function.

I also tried this snippet to disable the modal gallery:

 $(document.body).off('.modal-gallery.data-api') 

But that does not turn it off.

How can I write jQuery so that the modal gallery is turned off and the images open regularly as a link? (I need this snippet for a mobile site, which will be implemented in the footer after all the scripts have completed.)

+4
source share
2 answers

You can turn off automatic mode binding by deleting data-toggle = "modal" and bind the click event

 $('#mybutton').click(function (e) { if (data) { e.preventDefault(); $('#myModal').modal(); } }); 
+4
source

This only opens an image without a download modality.

 div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-use-bootstrap-modal="false" 
0
source

All Articles