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 characters
function equalHeight(element) { | |
var currentTallest = 0, | |
currentRowStart = 0, | |
rowDivs = new Array(), | |
$el, | |
topPosition = 0; | |
$(element).each(function() { | |
$el = $(this); |
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 characters
// event.type должен быть keypress | |
function getChar(event) { | |
if (event.which == null) { // IE | |
if (event.keyCode < 32) return null; // спец. символ | |
return String.fromCharCode(event.keyCode) | |
} | |
if (event.which != 0 && event.charCode != 0) { // все кроме IE | |
if (event.which < 32) return null; // спец. символ | |
return String.fromCharCode(event.which); // остальные |