Skip to content

Instantly share code, notes, and snippets.

@kylefox kylefox/index.html
Last active Aug 29, 2015

Embed
What would you like to do?
<a href="/foo.html" data-modal="#foo-modal">Foo</a>
<div id="foo-modal" class="modal">
Hello!
</div>
<script>
$(function() {
$('a[data-modal]').on('click', function() {
$($(this).data('modal')).modal();
return false;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.