Я заинтересован в создании статичной «рейтинговой бары», аналогичной той, что находится здесь: http://gdgt.com/improv-electronics/boogie-board/1st-gen/, но я не уверен, как бы я это сделал.Активировать JavaScript, когда пользователь «видит» элемент?
В основном при загрузке страницы он не активирует элемент, но когда вы прокручиваете его до стержней, он загружает их.
Как я мог бы продолжать делать что-то в этом роде?
Вот HTML я до сих пор:
<ul class="product-criteria-bars">
<li>
<div class="product-criteria-label">
Accuracy and sensitivity
</div>
<div class="product-criteria-bar">
<div class="fill light-green filled" data-width="240" style="width: 240px;"></div>
<noscript>
<div class="fill light-green" style="width: 240px;"></div>
</noscript>
</div>
<div class="rating light-green">8.0</div>
<div class="clear"></div>
</li>
<li>
<div class="product-criteria-label">
Ergonomics/comfort
</div>
<div class="product-criteria-bar">
<div class="fill light-green filled" data-width="240" style="width: 240px;"></div>
<noscript>
<div class="fill light-green" style="width: 240px;"></div>
</noscript>
</div>
<div class="rating light-green">8.0</div>
<div class="clear"></div>
</li>
</ul>
Но что еще мне нужно сделать, JS мудр?
http://stackoverflow.com/questions/2158991/fire-javascript-event-when-a-div-is-in-view –