Created
May 14, 2014 19:32
-
-
Save djbobbydrake/212f7ea0c5740b2f5841 to your computer and use it in GitHub Desktop.
JS in Drupal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
Drupal.behaviors.mobileFormErrors = function (context) { | |
$("form.user-form", context).each(function(){ | |
if ($(this).find(".error").length) { | |
window.location.hash = window.location.hash || $(this).attr("id"); | |
return false; | |
} | |
}); | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment