Skip to content

Instantly share code, notes, and snippets.

View meysam2594's full-sized avatar

Meysam Shobeiri meysam2594

  • London
View GitHub Profile
@meysam2594
meysam2594 / Bootstrap Modal Print
Created February 8, 2021 18:05 — forked from labboy0276/Bootstrap Modal Print
Bootstrap Modal Print
How to print a Bootstrap Modal (this was for Drupal 7 site as a FYI):
Add this to the modal
<button type="button" class="btn btn-default print" onClick="window.print();return false">Print</button>
Create a JS file and do this:
( function($) {
$(document).ready(function(){
// Add Print Classes for Modal
$('.modal').on('shown.bs.modal',function() {