Jump to content

click problem


Matej

Recommended Posts

Cannot read property of "null" , it works fine when first click on last TD and go to the last one (clicking each one) ,i guess when error show up content ain't loaded yet or the variable are overwritting themselves (as i click on more of Td elements in a row in a random order) //which is strange , i guess i gotta use closures right? but i use em on "onclicK" function it doesnt change a thing

Link to comment
Share on other sites

e.target is already pointing to the element with class .bodky at least some of the time, so there is no element .bodky inside it.

 

Perhaps e.currentTarget, if not, then check the className of e.target and choose e.target.parentNode instead if the class if bodky.

Link to comment
Share on other sites

e.target is already pointing to the element with class .bodky at least some of the time, so there is no element .bodky inside it.

 

Perhaps e.currentTarget, if not, then check the className of e.target and choose e.target.parentNode instead if the class if bodky.

 

e.currentTarget is working , thank you very much , but shouldnt e.target point to TD element all the time? i mean i used event.target just for querySelector = to get some element from element which triggered event = event.target , or am i wrong?

//

nevermind realized that

Edited by Matej
Link to comment
Share on other sites

One more question i fixed it here http://jsfiddle.net/Trolstover/qxd32hkk/13/, works fine , but there whenever you click on element while its still changing opacity something strange happen , it shows .hidden and .bodky at the same time even tho i specifed that function interval which change opacity should be invoked only when the .bodky opacity is equal = 0 or 1 , strange is that i had to if(decko.style.opacity="") even tho i have defined opacty of both .hidden and .bodky in the css.

Edited by Matej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...