Permalink
Browse files

Remove trailing spaces and check for right version

closes #51
  • Loading branch information...
1 parent d4899b3 commit 085d910a5ec07b69f31beabce286141aa26f3005 Neeraj Singh committed Nov 29, 2010
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/rails.js
View
@@ -5,7 +5,7 @@
*
* This rails.js file supports jQuery 1.4.3 and 1.4.4 .
*
- */
+ */
jQuery(function ($) {
var csrf_token = $('meta[name=csrf-token]').attr('content'),
@@ -35,7 +35,7 @@ jQuery(function ($) {
* - ajax:success - is executed when status is success
* - ajax:complete - is execute when status is complete
* - ajax:failure - is execute in case of error
- * - ajax:after - is execute every single time at the end of ajax call
+ * - ajax:after - is execute every single time at the end of ajax call
*/
callRemote: function () {
var el = this,
@@ -86,7 +86,7 @@ jQuery(function ($) {
}
}
});
-
+
/**
@@ -155,8 +155,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.');
- }
+ if (!( (jqueryVersion === '1.4.3') || (jqueryVersion === '1.4.4'))){
+ alert('This rails.js does not support the jQuery version you are using. Please read documentation.');
+ }
+
});

0 comments on commit 085d910

Please sign in to comment.