common.js 800 B

123456789101112131415161718192021222324252627
  1. $(document).ready(function () {
  2. $(".call").click(function (e) {
  3. e.preventDefault();
  4. $(".callback.popup").css("display", "block");
  5. });
  6. $(".close").click(function (e) {
  7. e.preventDefault();
  8. $(".popup").css("display", "none");
  9. });
  10. var scroll = function (e) {
  11. var id = "#" + $(e.target).attr("data-to");
  12. var mnuH = $('header .top-mnu').height();
  13. var top = $(id).offset().top - mnuH;
  14. $('body,html').animate({scrollTop: top}, 1500);
  15. };
  16. var increase = function (e) {
  17. $(this).find('.hover-img').toggleClass("big");
  18. };
  19. $('.top-mnu nav').on('click', scroll);
  20. $('#contact-us').on('click', scroll);
  21. $("#up").on('click', scroll);
  22. $('.hover-block').on('mouseenter mouseleave', increase);
  23. });