PDA

View Full Version : JQuery a href help


abchase
01-05-2010, 01:04 AM
Ok so I'm running into some issues. I haven't been involved with JavaScript or JQuery in some time. Subsequently I lost most of my skills. Any help is greatly appreciated.

I have a navigation panel, A is the containing div, B is the link.


<div id:A>
<div id:B> <a href:""> </a> </div>
</div>


When the link gets clicked, A animates across the screen, then is supposed to go to the link.


$(document).ready(function(){
$("#B").click(function () {
$("#A").animate({
width: "746px",
left: "144px"
}, 400 );
$(this).delay(1000,function(){
$('a[href=../page.html]').live();
});
});
});


I get the animate, and the delay, but not to the other page. I know I did something wrong, and can take the abuse. But for the life of me, I'm giving up... for tonight.

Thanks.

abchase
01-05-2010, 01:40 AM
Alright, I didn't give up. The page redirect/load/whatever you want to call it, works. ** Kind of **


$(document).ready(function(){
$("#HomeBtn").click(function () {
$("#NBHome").animate({
width: "746px",
left: "144px"
}, 400 );
$(this).delay(700,function(){
$(this).load("home.html");
});
});



This is a tough one to explain. All of my navigation is on the right. When you click, the div that contains the link, animates to span across to the left, the page loads, then the div returns to the right position.
I'm having trouble, animating to the left, then loading the appropriate page. I have the proper animation for the page, once it's loaded...