Yobd Digital Yobd Digital - 1 year ago 130
Javascript Question

Javascript not adding id in address bar

For some reason this javascript will not add the id of the clicked element into the address bar. It will do everything else correctly.

here is the jsfiddle:

so for example if I click on

I want it to put the id in the address bar like so:

Answer Source

Remove the prevent default function: