VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: themhz on October 13, 2012, 10:37:27 AM

Title: jQuery("#dialog").dialog("open"); will repeat its content when hovering
Post by: themhz on October 13, 2012, 10:37:27 AM
Hello, I made an extension in the back end, and I need to use jquery ui dialog box .
When I open the dialog box and hover with the mouse over, it keeps writing all the html that is included in the dialog box, on the bottom of the page. As long as o move the mouse over the dialog box, it keeps repeating the process causing to write infinitely those elements .
For example if I have two textboxes in the dialog  box div, and then open it, when I hover the mouse over, it will write those two textboxes on the page, if I keep moving the mouse those two textboxes are being printed on the page as many times as I move the mouse. How can I fix this?
Title: Re: jQuery("#dialog").dialog("open"); will repeat its content when hovering
Post by: themhz on October 13, 2012, 10:58:30 AM
I found it. I just needed to add jQuery('#dialog').unbind(); after opening the dialog box like this

jQuery("#dialog").dialog("open");
jQuery('#dialog').unbind();