Reac front end for psicometric app

animations.js 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. $(document).ready(function(){
  2. $(function(){
  3. $('a[href*=#]').click(function() {
  4. if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
  5. && location.hostname == this.hostname) {
  6. var $target = $(this.hash);
  7. $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
  8. if ($target.length) {
  9. var targetOffset = $target.offset().top;
  10. $('html,body').animate({scrollTop: targetOffset}, 1000);
  11. return false;
  12. }
  13. }
  14. });
  15. });
  16. $(window).scroll(function() {
  17. // Menu fixed
  18. if($(this).scrollTop() > 100){
  19. $('.content_menu').addClass('menu_fixed');
  20. }else{
  21. $('.content_menu').removeClass('menu_fixed');
  22. }
  23. // Resolución superior a 1050px
  24. if ($(this).width() >= 1050) {
  25. console.log("Heigh: " + $(this).scrollTop());
  26. if($(this).scrollTop() > 390){
  27. $('#inicio').fadeIn(1000);
  28. }if($(this).scrollTop() > 960){
  29. $('.services_row > div > div').fadeIn(1000);
  30. }if($(this).scrollTop() > 2000){
  31. $('.porta_body').show('slow');
  32. }
  33. }
  34. // Resolucón de laptop
  35. else if($(this).width() < 1050 && $(this).width() >= 800){
  36. }
  37. // Resolución Tablet
  38. else if($(this).width() < 800 && $(this).width() >= 768){
  39. }
  40. // Resolución movil
  41. else if($(this).width() < 768 && $(this).width() >= 568){
  42. }
  43. else if($(this).width() < 568){
  44. }
  45. });
  46. });
  47. $( "#header-active" ).find( "li" )