logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-03-2009, 09:23 AM   #1
codelocator
 
Join Date: Feb 2009
Posts: 3
Question jquery - fade-out, fade in.. fade out fade in?

Hi, my first post here, any help would be great.

I spent most of yesterday trying to work out how to use a javascript library to fade out a clicked text, replacing it with another, and so on.

Eventually I came across this page, the closest I got after abandoning Spry, this uses jquery

http://www.jhlabs.co.uk/2008/07/jque...-fade-back-in/

It's half way there, but now I'm stuck. Not sure if it's a deadend or not. My javascript/jquery knowledge could be a lot better..

This page should hopefully illustrate my problem and aim

http://www.codelocator.co.uk/experim...periments.html

Can anyone suggest how I should edit the existing code to achieve what I want, or another non-flash means of doing so?

I've been fumbling with the code unsuccessfully trying to make a fade to a third text field. Can anyone suggest how I should edit the existing code to achieve what I want, or another non-flash means of doing so? If anyone could be so kind as to point me in the right direction that would be very much appreciated.

Cheers

Adam

Last edited by codelocator; 02-03-2009 at 09:38 AM..
codelocator is offline   Reply With Quote
Old 02-03-2009, 06:22 PM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Quote:
Originally Posted by codelocator View Post
This page should hopefully illustrate my problem and aim

http://www.codelocator.co.uk/experim...periments.html
It's even better if you can describe please. I just see an an empty page, and I am too busy to start dissecting your code to find out something you could spend 10 seconds describing.
Welcome to the forums btw!
domedia is offline   Reply With Quote
Old 02-03-2009, 06:44 PM   #3
codelocator
 
Join Date: Feb 2009
Posts: 3
Default

Thanks

Ok, I'll try. You should see a page here - http://www.codelocator.co.uk/experim...periments.html - with the text 'moving on' and if you click that it should fade out to be replaced with 'should now be at able to click through' an if you click that it should fade out and be replaced by 'this third text'. That's a little progress from my first post. This is basically what I wanted to achieve, to fade out the content on click and replace it with different content in the same place, and so on, except that I'd like to add links and images to the texts and I'm not sure how to achieve that.

The code's author - http://www.jhlabs.co.uk/2008/07/jque...n/#comment-285 - says -

"Rather than changing the text dynamically in the javascript, i would recommend you instead show/hide divs dynamically. So rather than using the append() function you instead use the. show() function."

I wish I knew what that meant. Without much clue I changed the .append to .show where it appeared, still no idea how to get links and images in though. I probably need to go and finish those javascript and jquery tutorials.

Last edited by codelocator; 02-03-2009 at 06:56 PM..
codelocator is offline   Reply With Quote
Old 02-03-2009, 09:14 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

If the scripts author can't help you I doubt I can, apart from writing it all for you which I'm not doing. This could be a great opportunity to learn about the jQuery framework. Remember that learning a framework is much easier to learn than to actually learn JavaScript. You could also just stick with the Dreamweaver behaviors, but it sounds like it's too restrictive for you, right?
domedia is offline   Reply With Quote
Old 02-03-2009, 10:55 PM   #5
codelocator
 
Join Date: Feb 2009
Posts: 3
Default

Thanks. Yeah, I've used Spry a bit in the past, I've got something not dissimilar to what I want to do atm, it uses an xml file for the content

http://www.codelocator.co.uk/portfolio.html

But that's about as close as I can get to what I want to do here with Spry, I've read briefly about using queued effects clusters and that sounds like it might work, but when I looked into it jquery seemed like it would be simpler and a more worthwhile thing to learn more about. I'd presumed it would be better run through the w3c schools javascript pages first but maybe I'll get straight on with learning jquery. This was recommended

http://blog.themeforest.net/tutorial...-video-series/
codelocator is offline   Reply With Quote
Old 02-04-2009, 01:30 AM   #6
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

the jQuery site has links to some very good tutorials.

I find w3schools to be very outdated, and sometimes just wrong info. But it's better than nothing.
domedia is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 10:26 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com