<h2 data-link="http://goggle.de">berschrift mit Link ansatz</h2> <div id="logs"></div>
h2{ text-align:center; font-size:34px; display:inline-block; margin-left:25%; } h2:before{ width:30px; height:30px; content:''; display:inline-block; } h2:hover:before{ content:''; background:url(https://bitcoin.org/img/icons/mini_ico_anchor.svg?1528322191); background-size:30px 30px; width:30px; height:30px; display:inline-block; cursor:pointer; }
span = document.querySelector('h2'); span.addEventListener('click', function (e) { if (e.offsetX <30) { h=$(this).data('link'); open(h) } else { } });
External Javascript and CSS
-