I am having trouble figuring out what is causing the click event to fire more than once in the webapp below. Please visit the url, click on any level [from Ground - 4], and then click on a unit.
http://plaza.foxqa.com.au/touch/index.html
That will bring up the Unit Details [price, images etc.]. The images in this page has a click event attached to them which basically enlarges the image. This event keeps stacking up. It will work fine when a unit is clicked for the first time.
Then it will fire twice for the second unit and three times for the third unit and so on. I tried to unbind the click event once the enlarged view is closed but still not working.
Any help would be appreciated.
Edit: Please test this in Google Chrome.
Edit 2: Steps that might help you figure out the problem sooner.
- Open the components_draft.js in your console.
- Add a breakpoint at line 687.
- Click on a level on the building
- Click on any green coloured unit [or lot].
- Once the unit details are displayed, click on the unit plan image.
- It gets enlarged.
- Click anywhere on the image and it will be minimized.
- Go back to step 4 by clicking the close icon.
- Repeat 5,6,7.
- Now, when the enalrged image is clicked, step through the functions in the console and you will see the click event looping twice for a single click.
I know following all of this is a pain but please take some time to analyze it.