I have a script as below
$(\'.button1\').click(function() { document.location.href=$(this).attr(\'id\'); });
the button1 has variable uniqu
Why not just change the second line to
document.location.href="www.example.com/index.php?id=" + $(this).attr('id');