E
E
Enniack2015-11-09 18:18:19
JavaScript
Enniack, 2015-11-09 18:18:19

Defining parent and then child element via this?

jsfiddle.net/jhfgj5Lr/2

I'm trying to have the .wrap-span's parent, .wrap, be determined when the .wrap-span is clicked, and then look for its .wrap-p child element and apply .fadeIn(). I try through this, it doesn't work.
I ask for your help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Murat Atila, 2015-11-09
@Enniack

I think everything will be clear here.
jsfiddle.net/jhfgj5Lr/3

D
Dark_Scorpion, 2015-11-09
@Dark_Scorpion

Write a sample code.
Most likely, your this changes when it gets into the handler function. To get rid of the problem, you need to store this in a variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question