Reputation: 93
I have this site:
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
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