How would I go about setting a link to perform certain functions like hide div then go to destined url
something like this
$(document).ready(function(){ $("a").click(function(){ $("#div1").slideUp("slow"); $("#div2").slideUp("slow"); // then go to index.html }); });
This is my setup.
<script type="text/javascript">   $(document).ready(function(){
     $("a").click(function(){
     $("#one").hide("slow");
     $("#two").hide("slow" , function(){
     window.location (index.html);
       });
    });   });    </script>   
<div id="one"> some content </div>
<div id="two"> some content </div>
<a href="#">BUTTON HERE</a>
It only performs the hide function, if I replace the url in the html it perform the url only. I must be doing something Wrong