let str = '<h1>Я</h1>\n<p>Помню</p>\n<h1>Чудное</h1>\n<p>Мгновенье</p>';
let div = document.createElement('div');
div.innerHTML = str;
let ps = div.getElementsByTagName('p');
prices = {
khabarovsk: {
moscow: 1000,
spb: 1000
},
moscow: {
khabarovsk: 1000,
spb: 500
},
spb: {
khabarowsk: 1000,
moscow: 500
}
};
$('.final_price').html(prices[$('#select1').val()][$('#select2').val()]);
$('.click-to-remove-class').click() {
$($(this).data('selector-where-to-remove-class')).removeClass('d-none');
}
<a href='#' id='novosib-button' class='click-to-remove-class' data-selector-where-to-remove-class = '#novosib-city'>
Click here
</a>
<div id='novosib-city' class='d-none'>...</div>