<a data-id="id" onclick="toggle" ><a>function toggle (e) {
var id = e.currentTarget.dataset.id;
var block = document.querySelector('#' + id);
block.style.display = block.style.display === 'none' ? 'block' : 'none';
}
$('#price').val(price);