I’m trying to fade in a hidden element based on the href attribute of a clicked link but I can’t figure out how, I tried this:
http://jsfiddle.net/vengiss/Zhn2W/
But for some reason $(textBlock) just returns an empty object.
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are using
this(which refer to the clicked anchor) instead of the intended element to find the text blocks. Try using#text-blocks > divselector instead:This is a working jsfiddle of it.
EDIT:
Also you may want to avoid fadding in and out the already chosen element and in that case use
.not():This is a working jsfiddle of this edition.