Skip to content

Instantly share code, notes, and snippets.

@bradleybeddoes
Created April 2, 2012 05:29
Show Gist options
  • Select an option

  • Save bradleybeddoes/2281012 to your computer and use it in GitHub Desktop.

Select an option

Save bradleybeddoes/2281012 to your computer and use it in GitHub Desktop.
$(document).on('click', '.ajax-modal', function() {
$.get($(this).attr('data-load'),function(d){
$("#show-ajaxload-modal .modal-body").html(d);
$("#show-ajaxload-modal").modal('show');
});
});
----
<a href="#" class="btn btn-small ajax-modal" data-load="${createLink(controller:'subject', action:'showpublic', id:subject.id, absolute:true)}" ><g:message code="label.quickview" default="Quick View"/></a>
----
<div id="show-ajaxload-modal" class="modal hide fade">
<div class="modal-body"></div>
</div>
@bradleybeddoes

Copy link
Copy Markdown
Author

Just something simple to load dynamic content into a Twitter Bootstrap modal window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment