- $('.backdrop,.modal').each(function(el){
- document.body.appendChild(el);
- });
- $('#solution').on('click', function (e){
- show_modal();
- e.preventDefault();
+ $('.backdrop,.modal').each(el => document.body.appendChild(el) );
+ $('#solution').on('click', e => {
+ if(window.matchMedia("(min-width: 768px)").matches){
+ show_modal();
+ e.preventDefault();
+ }