I’m looking to create a modal popup that only pulls the data inside the modal popup at the point of mouseover, so i dont have to preload a ton of data – instead i would like it to pull the data at the point of mouseover – are there any existing scripts/frameworks out there that would make this easy?
Share
This can be achieved quite easily with jQuery and SimpleModal:
Short explanation of the code:
clickhandler to the<a id="create-modal">mouseovervariable (so we can unbind it later)<div id="modal-content">.mouseoverevent.mouseoverevent handler, we use jQuery’sload()function to fetchmodal.htmlfrom the server and jam this into the#modal-contentelement.unbindthe event handler so it will only be invoked on the firstmouseoverevent.