Try to use like this:
<script type="text/javascript">
$(document).ready(function () {
$('[id*=btnShowDetails]').click(function () {
debugger;
// $(location).attr('href', './AddToCart.aspx?ProductId=3');
window.location.href = "your URL";
});
});
</script>
Please post back your queries in comments if not solved.
Thanks
:)