showing results for - "elementor open specific tab 2c toggle or accordion on link click"
Jakob
14 Apr 2018
1<script>
2
3
4document.addEventListener('DOMContentLoaded', function() {
5setTimeout(function() {
6
7jQuery(function($){
8let toggletitles = $('.elementor-toggle-item .elementor-tab-title');
9
10let strings = ['?hello',
11'?heythere',
12'?bonjour'
13];
14
15strings.forEach( (string,i) => {
16if (window.location.href.indexOf(string) > -1) {
17toggletitles.eq(i).click();
18$('html, body').animate({
19scrollTop: toggletitles.eq(i).offset().top - 100
20},'slow');
21} } );
22}); }, 1200); });
23</script>
24
Jawad
17 Jan 2019
1<script>
2
3document.addEventListener('DOMContentLoaded', function() {
4setTimeout(function() {
5
6jQuery(function($){
7
8let desktoptitles = $('.elementor-tab-desktop-title');
9let mobiletitles = $('.elementor-tab-mobile-title');
10
11let strings = ['?hello',
12'?heythere',
13'?bonjour'
14];
15
16strings.forEach( (string,i) => {
17if (window.location.href.indexOf(string) > -1) {
18desktoptitles.eq(i).click();
19mobiletitles.eq(i).click();
20$('html, body').animate({
21scrollTop: desktoptitles.eq(i).offset().top - 100
22},'slow');
23} } );
24}); }, 1200); });
25</script>
26
Enrico
01 Apr 2016
1<script>
2
3document.addEventListener('DOMContentLoaded', function() {
4setTimeout(function() {
5
6jQuery(function($){
7let accordiontitles = $('.elementor-accordion-item .elementor-tab-title');
8
9let strings = ['?hello',
10'?heythere',
11'?bonjour'
12];
13
14strings.forEach( (string,i) => {
15if (window.location.href.indexOf(string) > -1) {
16accordiontitles.eq(i).click();
17$('html, body').animate({
18scrollTop: accordiontitles.eq(i).offset().top - 100
19},'slow');
20} } );
21}); }, 1200); });
22</script>
23