Author: Vinayak Sutar

it ind complexity

Once upon a time, Gustav II Adolf, the king of Sweden gave orders to build the biggest war ship that would ever set sail on the oceans of his time: The Vasa. Among the planned key features of the vessel were two decks stuffed with cannons. Such a power of arms has been unprecedented. The […]

jQuery: check if element is visible on screen

<div class=”container”> <div class=”text text-1″> Lorem ipsum <span></span> </div> <div class=”text text-2″> Lorem ipsum <span></span> </div> </div> .container { height: 100rem; } .container .text { text-align: center; font-size: 1.5rem; } .container .text.text-1 { margin-top: 5rem; } .container .text.text-2 { margin-top: 50rem; } .container .text span { color: #f20; } $(window).scroll(function(){ $(‘.text’).each(function(){ if(isScrolledIntoView($(this))){ $(this).children(‘span’).text(‘visible’); } else{ […]