Reac front end for psicometric app

home.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. if($(this).scrollTop() > 390){
  26. $('#inicio').fadeIn(1000);
  27. }if($(this).scrollTop() > 960){
  28. $('.services_row > div > div').fadeIn(1000);
  29. }if($(this).scrollTop() > 2000){
  30. $('.porta_body').show('slow');
  31. }
  32. }
  33. // Resolucón de laptop
  34. else if($(this).width() < 1050 && $(this).width() >= 800){
  35. }
  36. // Resolución Tablet
  37. else if($(this).width() < 800 && $(this).width() >= 768){
  38. }
  39. // Resolución movil
  40. else if($(this).width() < 768 && $(this).width() >= 568){
  41. }
  42. else if($(this).width() < 568){
  43. }
  44. });
  45. });