HTML
- 12 ответов
- 0 вопросов
5
Вклад в тег
function come(elem) {
var docViewTop = $(window).scrollTop(),
docViewBottom = docViewTop + $(window).height(),
elemTop = $(elem).offset().top,
elemBottom = elemTop + $(elem).height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
if (come("#section2")) {
...
}
<script async src="example.js"></script>
@font-face {
font-family: 'Conv_Cuprum';
src: url('../fonts/Cuprum.eot');
src: url('../fonts/Cuprum.eot?#iefix') format('embedded-opentype'),
url('../fonts/Cuprum.svg') format('svg'),
url('../fonts/Cuprum.woff') format('woff'),
url('../fonts/Cuprum.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}