I am calling a function like the one below by click on divs with a certain class.
Is there a way I can check when starting the function if a user is using Internet
Using modernizr
Modernizr.addTest('ie', function () { var ua = window.navigator.userAgent; var msie = ua.indexOf('MSIE ') > 0; var ie11 = ua.indexOf('Trident/') > 0; var ie12 = ua.indexOf('Edge/') > 0; return msie || ie11 || ie12; });