public static void setTop ( Element element , int top ) { if ( Dom . isIE ( ) ) { // Limitation in IE8... while ( top > 1000000 ) { top -= 1000000 ; } while ( top < - 1000000 ) { top += 1000000 ; } } Dom . setStyleAttribute ( element , "top" , top + "px" ) ; }
Apply the top style attribute on the given element .