(function ($) { "use strict"; $(document).on('click', 'body:not(".loggen-in") .purchase-course .thim-enroll-course-button', function (e) { if ($(window).width() > 767) { if ( $('.thim-login-popup .login').length ) { e.preventDefault(); $('.thim-login-popup .login').trigger('click'); } } }); })(jQuery);