I am using css wildcards selectors and jquery wildcard selectors in my project. Everything seems to work fine if I only have one result but if I have two dialogs then I got strange results.
Working with selectors and only one dialog and div:
Working with selectors and two dialogs and divs:
-
In order to see the error just move the two dialogs side by side. First click inside the first dialog and the form fields will get the correct value. Afterwards click inside the second dialog. The values are wrong. I think is calculating the values according the div inside the 1st dialog.
-
Secondly, in Firefox I have some strange results after clicking inside the 1st dialog. For example I get x = 12.[2139219329193] some random numbers instead of just an integer.
Desirable result:
When you click inside a dialog I want to get the correct coordinates according the div inside the dialog. I want co-ordinates between 0,0 and 320,400 which is the size of the two images!
Try replacing this:
With this:
The former will find both pointer DIV’s again, call
dialog("open")on both, and then returnoffset()for the first of the elements found.Whereas the second version uses
this, which, when used inside aclickhandler, will always point to the specific element that was clicked.