<script>
    jQuery(document).ready(function(){
        function isInViewport(dev_prakash_selector) {
          var elementTop = jQuery(dev_prakash_selector).offset().top;
          var elementBottom = elementTop + jQuery(dev_prakash_selector).outerHeight();
          var viewportTop = jQuery(window).scrollTop();
          var viewportBottom = viewportTop + jQuery(window).height();
          return elementBottom > viewportTop && elementTop < viewportBottom;
        }

        jQuery(window).scroll(function() {
          jQuery('.step_circle li.outer').each(function() { //simply change the selector as per your need
            var dev_prakash_selector = jQuery(this);
            if (isInViewport(dev_prakash_selector)) {
              jQuery(this).addClass("in_viewpport"); //change the "in_viewpport" class name as per your need
            } else {
              jQuery(this).removeClass("in_viewpport"); //change the "in_viewpport" class name as per your need
            }
          });
        });
 });
</script>

Categorized in:

Tagged in:

, ,