Answers for "Elementor Open Specific Tab, Toggle or Accordion on Link Click"

0

Elementor Open Specific Tab, Toggle or Accordion on Link Click

<script>

document.addEventListener('DOMContentLoaded', function() {
setTimeout(function() {

jQuery(function($){

let desktoptitles = $('.elementor-tab-desktop-title');
let mobiletitles = $('.elementor-tab-mobile-title');

let strings = ['?hello',
'?heythere',
'?bonjour'
];

strings.forEach( (string,i) => {
if (window.location.href.indexOf(string) > -1) {
desktoptitles.eq(i).click();
mobiletitles.eq(i).click();
$('html, body').animate({
scrollTop: desktoptitles.eq(i).offset().top - 100
},'slow');
} } );
}); }, 1200); });
</script>
Posted by: Guest on July-14-2021
0

Elementor Open Specific Tab, Toggle or Accordion on Link Click

<script>

document.addEventListener('DOMContentLoaded', function() {
setTimeout(function() {

jQuery(function($){
let accordiontitles = $('.elementor-accordion-item .elementor-tab-title');

let strings = ['?hello',
'?heythere',
'?bonjour'
];

strings.forEach( (string,i) => {
if (window.location.href.indexOf(string) > -1) {
accordiontitles.eq(i).click();
$('html, body').animate({
scrollTop: accordiontitles.eq(i).offset().top - 100
},'slow');
} } );
}); }, 1200); });
</script>
Posted by: Guest on July-14-2021
0

Elementor Open Specific Tab, Toggle or Accordion on Link Click

<script>


document.addEventListener('DOMContentLoaded', function() {
setTimeout(function() {

jQuery(function($){
let toggletitles = $('.elementor-toggle-item .elementor-tab-title');

let strings = ['?hello',
'?heythere',
'?bonjour'
];

strings.forEach( (string,i) => {
if (window.location.href.indexOf(string) > -1) {
toggletitles.eq(i).click();
$('html, body').animate({
scrollTop: toggletitles.eq(i).offset().top - 100
},'slow');
} } );
}); }, 1200); });
</script>
Posted by: Guest on July-14-2021

Code answers related to "Elementor Open Specific Tab, Toggle or Accordion on Link Click"

Code answers related to "Javascript"

Browse Popular Code Answers by Language