HTML
1<map name="primary">
2 <area shape="circle" coords="75,75,75" alt="f" data-src="https://placehold.jp/350x150.png?text=f" />
3 <area shape="circle" coords="275,75,75" alt="i" data-src="https://placehold.jp/350x150.png?text=i" />
4</map>
5<img usemap="#primary" src="https://placehold.jp/350x150.png?text=f" alt="350x150" />
JavaScript
1$(document).on('click', 'area', function(event) {
2 event.preventDefault();
3 const area = $(this);
4 $('img[usemap="#primary"]').prop('src', area.attr('data-src'));
5
6 // 以下、クリックしたarea要素で分岐。
7});
https://developer.mozilla.org/ja/docs/Web/HTML/Element/map
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。