I have a modal dialog plugin written in jquery that binds to the click event for all <a> elements with a specific class.
The modal dialog "selects" the page through AJAX, which is declared under the "href" parameter in the <a> element.
Everything works fine, but - when the user presses the <a> button before the page has been fully loaded and ready (before the click event is attached to the element) - the browser goes to the page declared in the "href" parameter.
Any ideas on how to prevent this behavior? An ideal situation would be to ignore clicks on these elements until the page is fully loaded. Client-side performance is critical.
source share