Created
August 11, 2011 01:33
-
-
Save tadamak/1138720 to your computer and use it in GitHub Desktop.
Revisions
-
tadamak created this gist
Aug 11, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ var validator = $("#form").data('validator'); validator.settings.errorPlacement = function (error, element) { // Error placement for single elements var offset = element.offset(); error.insertBefore(element) error.addClass('message'); // add a class to the wrapper error.css('position', 'absolute'); error.css('left', offset.left + element.outerWidth()); error.css('top', offset.top - (element.height() / 2)); };