Javascript question
- Started
- Last post
- 12 Responses
- CygnusZero4
Helping someone out on a problem with their page they are working on.
http://kpmginfo.com/digitaldivid…
There's some panels on that page, and when you click them they expand. Eventually after clicking the panels for a little bit (strange that it doesnt happen when you first hit the page), the expanded versions start randomly closing by themselves.
This problem ring a bell for anyone?
- dbloc0
not doing that for me. seems to work fine.
- pockets0
working fine, i see side scrolling tho D:
- uan0
they probably need to unbind the clickevents after click, the random closing happened here (chrome osx) when I clicked a button twice, but after the first click the button should be off to let the slide animation happen.
jquery off function or maybe also unbind http://api.jquery.com/off/
- dbloc2
pop that video up...don't play it in that little ass square.
- mekk0
Also working fine here, Chrome/Mac. But this website really needs some improvements, e.g. live form field validation (and formatting!), better images, smaller fonts on smaller viewports..
Is this production quality at their house?
- CygnusZero40
Dont worry about the design. I didnt create it, have no input on it.
This issue happens after a while of pulling the panels up. Say like 30 seconds or so, and then it happens randomly. Did you check it long enough?
- Trying to help a developer buddy of mine who is dealing with this panel problem.CygnusZero4
- mekk0
It happens when you click a panel before the closing animation has completely finished. Check the event order..
- fyoucher10
You could set a flag / bool variable to check if it's animating and then only execute the opening animation (or anything) if the animation has completed. The bool gets set whenever the animation is complete. Prob with this is that everything is disabled while things are animating and you have to wait.
Or you can add and remove event listeners each time you click and provide an alternate animation if an animation is already in progress.
- CygnusZero40
Thx. Im sending him these suggestions of things to try.
- uan0
// ----------------------------no bug open
-_-_-_-_-open click fired
app.js:139 add class openpage fired
app.js:141 fadeDashBoard fired
// ----------------------------no bug open// ----------------------------no bug close
VM1434:1934 mousedown MouseEvent {isTrusted: true}
app.js:116 ---------------close click fired!
app.js:119 .onefunction firing
app.js:122 this remove classes function firing
app.js:124 showDashBoard
// ----------------------------no bug close// ----------------------------doub... click
VM1434:1934 mousedown MouseEvent {isTrusted: true}
app.js:137 -_-_-_-_-open click fired
app.js:139 add class openpage fired
app.js:141 fadeDashBoard fired
VM1434:1934 mousedown MouseEvent {isTrusted: true}
app.js:119 .onefunction firing
app.js:122 this remove classes function firing
app.js:124 showDashBoard
// ----------------------buggy double click- chrome dev console
http://www.briangrin…uan - you the man!CygnusZero4
- chrome dev console
- CygnusZero40
^ the guy said this just sketches out the problem, no solution in it though