I've implemented the simplemodal plugin for JQuery. Very nice btw! Where I'm having an issue, is I have a list of links that are generated from a database, when I click one, I make a "load" call and add the results to my osx-modal-content div. How do I call the osx plugin after my load completes? If I add class=osx to my a href, the modal opens before the content get into the div.
My Function to load html:
function loadContent(id) {
$("#osx-modal-dialog").load("Item.cfm?ID="+id+"");
// call OSX here????
$('#osx-modal-dialog').modal();
}
My DIV:
<div id="osx-modal-dialog">
<div id="osx-modal-content">
<div id="osx-modal-title">Title</div>
<div id="osx-modal-data">
<h2>Summary</h2>
<p>Description</p>
<p><button class="simplemodal-close">Close</button> <span>(or press ESC or click the overlay)</span></p>
</div>
</div>
</div>
Currently the osx plugin is looking for input or a click event. I'm not sure how to script a 'click' event ofter my load. Or maybe there is a better way to call the plugin.
Includes: