
href For EveryThing needs jquery to work, So add the CDN of jquery if not already added. Then add the href For EveryThing.js CDN into your project.
<!-- JQUERY -->
<script src='https://code.jquery.com/jquery-3.5.1.js'></script>
<!-- HREF FOR EVERYTHING -->
<script src='https://cdn.jsdelivr.net/gh/Niyko/href-For-EveryThing/src/hrefForEveryThing.js'></script>Now you can add href attribute to any HTML element as you want. When that element is clicked, the given link, Like :
<button href="http://google.com">Click me</button>
<div href="http://google.com">Click me</div>
<h1 href="http://google.com">Click me</h1>href For EveryThing example is available in codepen, Check it out : https://codepen.io/niyko/pen/XWmYvPN
Href For EveryThing is licensed under the MIT License.