Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
535 B
0
Indexable
Never
function updateSpecification() {
    let element = $('section.power-train-container #wds-tab-list-container-id .active');
    let elementToChange = $('.specification-container .specification .value')[0];
    
    if (element.text() == 'e-POWER') {
        elementToChange.innerText = '5';
    } else if (element.text() == 'Fuel-Powered') {
        elementToChange.innerText = '5 or 7';
    }
}


$('#wds-tab-list-container-id').on('click', '.tab', function() {
    updateSpecification();
});

updateSpecification();
Leave a Comment