Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Help with link override
Old 05-10-2010, 01:32 AM Help with link override
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
This is what I'm trying to do...
Whenever a link is clicked on my page I want to run a function and then when its complete I want to go to the link address. The code below does the animations but doesn't go to the link. Yes I know alt isn't a valid attribute for an anchor I'm just not sure what to do. Any ideas?

Code:
$('a').click(function() {
    soundManager.play('sound2');
    $('#img2_wrap').fadeOut(1500);
    $('#img3_wrap').fadeIn(1500, function() {
        $('#Content').animate({ width: "150%", top: "150px" }, 1200, function() {
            window.location = $(this).getAttribute('alt');
        });
        $('#img3_wrap').animate({ height: "240px" }, 1000);
    });
});
HTML Code:
<span>
    <a href="#" alt="http://www.google.com">Text!</a>           
</span>
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
 
Register now for full access!
Old 05-10-2010, 07:00 AM Re: Help with link override
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
remove the href attribute as that will cause the page to reload when the link is clicked and use the "rev" or "rel" attribute to hold the target URI.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-10-2010, 06:58 PM Re: Help with link override
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
Perfect. Thanks.
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Reply     « Reply to Help with link override
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41929 seconds with 12 queries