Permalink
Browse files

ensure that user is not using an incompatible version of jQuery .

  • Loading branch information...
Neeraj Singh
Neeraj Singh committed Nov 12, 2010
1 parent 5ba516f commit b19567e3acbf2ad0bba5be24806fabc738f40892
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/rails.js
View
@@ -76,8 +76,6 @@ jQuery(function ($) {
/**
* confirmation handler
*/
- var jqueryVersion = $().jquery;
-
$('a[data-confirm], button[data-confirm], input[data-confirm]').live('click', function () {
var el = $(this);
if (el.triggerAndReturn('confirm')) {
@@ -148,4 +146,9 @@ jQuery(function ($) {
});
});
+ var jqueryVersion = $().jquery;
+ if (!( (jqueryVersion === '1.4') || (jqueryVersion === '1.4.1') || (jqueryVersion === '1.4.2') )){
+ alert('This rails.js does not support the jQuery version you are using. Please read documentation.')
+ }
+
});

0 comments on commit b19567e

Please sign in to comment.