0

I am searching on Google and on stackoverflow for the error: too much recursion that i have with this script. But i don't found a solution. I try with event.stopPropagation(); but don't work for me in this script. URL/page where script is running: https://webdesignrebry.be/step/verloop/ I am using wordpress. On the page you have a href link and links in submenu that switch to the divi tabs in the left side. Can anybody help me? Thanks!

(function($){
    $('.voorbereiding').on('click', function(event){
        $('.ds-tab-cube .et_pb_tab_0 a').click();
    }); 
    $('.ontwikkeling').on('click', function(event){
        $('.ds-tab-cube .et_pb_tab_1 a').click();
    }); 
    $('.peiling').on('click', function(event){
        $('.ds-tab-cube .et_pb_tab_2 a').click();
    }); 
})(jQuery);

(function($){
    $('.valorisatie').on('click', function(event){
        $('.ds-tab-cube .et_pb_tab_3 a').click(); 
    }); 
})(jQuery);
1
  • You're raising click events within click events, which are caught by click event handlers which then raise more click events... Don't do that. Commented Nov 21, 2018 at 9:53

1 Answer 1

1

Please use this code

  (jQuery);
        (function($){

        $('.voorbereiding').on('click', function(event){

     $('.et_pb_tabs_controls .et_pb_tab_0 a').click();
        }); 

        $('.ontwikkeling').on('click', function(event){

     $('.et_pb_tabs_controls .et_pb_tab_1 a').click();
        }); 

        $('.peiling').on('click', function(event){

     $('.ds-tab-cube .et_pb_tab_2 a').click();
        }); 
        })(jQuery);
        (function($){

        $('.valorisatie').on('click', function(event){
     $('.et_pb_tabs_controls .et_pb_tab_3 a').click();
     });    
    })(jQuery);

Use above code in this javascript file :- https://webdesignrebry.be/step/wp-content/themes/Divi-Ultimate/js/custom-js.js

Sign up to request clarification or add additional context in comments.

1 Comment

If any help related to wordpress and magento you can reach me using my email [email protected]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.