| Issue 579: | Add overflow:hidden to html or body, before nm open modal box | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
Hi, as I say in summary, is there a way to add css property at body or html tag to prevent scrolling page when a modal box open to pop up? Many thanks, and have a nice day!
Apr 24, 2014
This is exectaly what I've been looking for, but unfortunately this is not working. Any ideas why?
Sep 22, 2014
The above fix worked for me, thanks! I was getting complaints about a double scroll bar when making the dialog very small. The above cleared it up. |
||||||
Well, after some search and few attempts i solved adding a callback: [code] <script type="text/javascript"> $(function () { $("[data-gal^='nyromodal']").nm({ callbacks: { beforeShowCont: function (nm) { $('body').css('overflow', 'hidden'); } } }); }); </script> [/code] Maybe I hope it will be usefull. Bye! :)