MrBoBo69

jQuery code to add request form

Aug 29th, 2024 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.95 KB | None | 0 0
  1. <script>
  2. document.addEventListener('DOMContentLoaded', function() {
  3. jQuery(function($){
  4. $('.form-section .about-one__form-content a.thm-btn').click(function(){
  5. $(this).closest('.elementor-section').next().slideToggle();
  6. $(this).toggleClass('opened');
  7. if( $(this).hasClass('opened') ) {
  8. $("html, body").animate({ scrollTop: $(this).closest('.elementor-section').next().offset().top-100 }, 1000);
  9. }
  10. });
  11. $('.closebutton').click(function(){
  12. $(this).closest('.elementor-section').prev().find('.form-section .about-one__form-content a.thm-btn').click();
  13. });
  14.  
  15. $('.form-section .about-one__form-content a.thm-btn').removeAttr("href");
  16.  
  17. });
  18. });
  19. </script>
  20. <style>
  21. .about-one__form-content a.thm-btn , .fee-section i , .fee-section img, .closebutton a, .closebutton i, .closebutton img{
  22. cursor: pointer;
  23. -webkit-transition: transform 0.34s ease;
  24. transition : transform 0.34s ease;
  25. }
  26. .opened i , .opened img , .opened svg{
  27. transform: rotate(90deg);
  28. }
  29. </style>
Tags: jQuery
Advertisement
Add Comment
Please, Sign In to add comment