Skip to content

Instantly share code, notes, and snippets.

View notMasterpiece's full-sized avatar

notMasterpiece

  • Ternopil
View GitHub Profile
function equalHeight(element) {
var currentTallest = 0,
currentRowStart = 0,
rowDivs = new Array(),
$el,
topPosition = 0;
$(element).each(function() {
$el = $(this);
// 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); // остальные