Larry Vollmer
asked on
JQuery conflicts/syntax issue
I have attached a simple HTML file.
I want two things to happen.
The problem I have is that the user can drag the image anywhere they want, but after the click, the image hides. I don't want the image to hide unless I click the button.
I would appreciate another set of eyes. Thanks!
drag.html
I want two things to happen.
- A user should be able to reposition the images anywhere on the browser why clicking the image and dragging it.
- They should be able to hide the image by clicking the Show/Hide 2 button
The problem I have is that the user can drag the image anywhere they want, but after the click, the image hides. I don't want the image to hide unless I click the button.
I would appreciate another set of eyes. Thanks!
drag.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!!
You are welcome.
So your click event handler on hideimage is triggering when you click the image instead of only the input.
Corrected code below
Open in new window
Note: you don't have to include each event handler in its own document ready ($(function() { } ); They can both go in the same one as above