In jquerymobile, I create a fixed header at here: http://jquerymobile.com/test/docs/toolbars/bars-fixed.html
You can see that, this toolbar is toggled (show or hide) when you tap on anywhere on the screen except tapping on the form’s elements.
Now I have a div, and write some functions for onclick event on this div tag, the problem here is when I tap on this div, the toolbar also be toggled. I just want to prevent this toggle when I tap on the div, the event when I tap on other places on the screen still be happened as normal for this toolbar.
Please help me if you have any clues on this problem.
Thanks in advance.
What you need is this:
It will prevent even propagation to parent div.
I have also created an example for you: http://jsfiddle.net/Gajotres/Xz2np/. You can remove/add event.stopPropagation() to see how it works.