• Jaime Roldos y Huayna Capac, Edificio El Consorcio, Ofi. 202
  • dentalesmm@hotmail.com
  • (593)07 2866082
  • (593) 09 87388132
  • Facebook
/*menu*/ function calculateScroll() { var contentTop = []; var contentBottom = []; var winTop = $(window).scrollTop(); var rangeTop = 200; var rangeBottom = 500; $('.navmenu').find('a').each(function(){ contentTop.push( $( $(this).attr('href') ).offset().top ); contentBottom.push( $( $(this).attr('href') ).offset().top + $( $(this).attr('href') ).height() ); }) $.each( contentTop, function(i){ if ( winTop > contentTop[i] - rangeTop && winTop < contentBottom[i] - rangeBottom ){ $('.navmenu li') .removeClass('active') .eq(i).addClass('active'); } }) }; $(document).ready(function(){ calculateScroll(); $(window).scroll(function(event) { calculateScroll(); }); $('.navmenu ul li a').click(function() { $('html, body').animate({scrollTop: $(this.hash).offset().top - 80}, 800); return false; }); });