0

I try redirect to index.php with this script writte

<script> 
jQuery(document).ready(function () {
    jQuery("#product").click(function () {
        jQuery(this).hide(1000);
        jQuery("#products_s").hide(10);
        setTimeout("location.href='index.php", 1000);
    });
});
</script>

The little script i create works but i can´t get redirect to index after the click over the link in div , i supose redirect ok , i think it´s write ok but sure the people of here can help me and see the fails

Only y get close the div but no redirect

Thank´s , Regards

4

2 に答える 2

1

に終了の引用符がありませんsetTimeout。eval を回避し、構文エラーを確認しやすくするために、次のように変更します。

setTimeout(function() {
    location.href = 'index.php';
},1000); 
于 2013-11-07T15:31:59.547 に答える