From 696577e05c7db53a9b3cd87ea5546dd54211db6b Mon Sep 17 00:00:00 2001 From: Gregzenegair Date: Fri, 26 Aug 2016 14:24:32 +0200 Subject: [PATCH] UPD test if jQuery.browser exists first Allow script to execute on jquery 1.9+ --- jquery.weekcalendar.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/jquery.weekcalendar.js b/jquery.weekcalendar.js index 011820c..3df3967 100644 --- a/jquery.weekcalendar.js +++ b/jquery.weekcalendar.js @@ -2020,17 +2020,19 @@ */ _disableTextSelect: function($elements) { $elements.each(function() { - if ($.browser.mozilla) {//Firefox - $(this).css('MozUserSelect', 'none'); - } else if ($.browser.msie) {//IE - $(this).bind('selectstart', function() { - return false; - }); - } else {//Opera, etc. - $(this).mousedown(function() { - return false; - }); - } + if ($.browser) { + if ($.browser.mozilla) {//Firefox + $(this).css('MozUserSelect', 'none'); + } else if ($.browser.msie) {//IE + $(this).bind('selectstart', function() { + return false; + }); + } else {//Opera, etc. + $(this).mousedown(function() { + return false; + }); + } + } }); },