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
| var scrollHeight = Math.max( | |
| document.body.scrollHeight, document.documentElement.scrollHeight, | |
| document.body.offsetHeight, document.documentElement.offsetHeight, | |
| document.body.clientHeight, document.documentElement.clientHeight | |
| ); |
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 isNumeric(n) { | |
| return !isNaN(parseFloat(n)) && isFinite(n); | |
| } |
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
| text-overflow: ellipsis; | |
| overflow: hidden; | |
| white-space: nowrap; |
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
| ­ | |
| example: | |
| text­text­text­ | |
| thanks http://www.quirksmode.org/oddsandends/wbr.html |
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
| $('select').each(function(){ | |
| var $this = $(this), | |
| numberOfOptions = $(this).children('option').length; | |
| $this.addClass('select-hidden'); // скрываем селект | |
| $this.wrap('<div class="select"></div>'); // оборачиваем селект в див | |
| $this.after('<div class="select-styled"></div>'); // после селекта добавляем класс который иммитирует сам селект | |
| var $styledSelect = $this.next('div.select-styled'); // выбираем иммитирующий селект блок | |
| $styledSelect.text($this.children('option').eq(0).text()); // добавляем ему текст от первого option'a |
NewerOlder