[Solved] How do i automatically add the h1 of a page to an ahref link on that page [closed]


It can be achieved like this:

JSFIDDLE

HTML

<h1>Web Developer</h1>
<a href="https://stackoverflow.com/questions/32713259/example.com/?Question12=">job link</a>

JQUERY

var link = $("a").attr("href");

link = link+$("h1").html();

link = link.replace(/\s/g,"%20");

$('a').attr("href", link);

7

solved How do i automatically add the h1 of a page to an ahref link on that page [closed]