validatr
validatr copied to clipboard
How can i retrieve element and position data?
I am using Javascript Custom Forms which replaces some elements with fake ones. In the case of select elements it moves them 9999 px to the left.
I would usually do something along the lines of:
function positionForSelect(event){
var e = window.event || event;
var t = e.target || e.srcElement;
if (t.nodeName.match(/select/i)) {
// move errormessage 9999px to the right
} else {
// normal behavior
}
}
*edit: I want to position the error validation message next to the fake select
Can you help me out on this one?