cristi
cristi

Reputation: 93

Why not working this redirect?

I have this site:

link

I want to create a redirect with this code below:

CODE JQUERY:

jQuery(document).ready(function($) {    
window.location.href = "http://stackoverflow.com";
})

You tell me what is wrong with this code and how can I restore it?

Thanks in advance!

Upvotes: 0

Views: 17

Answers (1)

Patel
Patel

Reputation: 1478

You don't have a reference to jQuery

Add this to your head tag in HTML :

<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

Upvotes: 1

Related Questions