In PHP it’s file.php?id=1 and then $_GET['id'] but how is it in jQuery? I have tried following but that didn’t work.
// jQuery
$('id-' + $1).click(function() {
// more code
}
// HTML
<div id="id-1">text</div>
I’m new to GET in jQuery so please be nice 😛
Thanks in advance.
you should parse location.search: