-
-
Save installero/d5028228d903928f28afad8f6c0f6d60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Lightbox 2 example</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.10.0/js/lightbox.js"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.10.0/css/lightbox.css"/> | |
<script> | |
$(document).on('click', '[data-alert]', function() { alert($(this).data('alert')); return false }); | |
</script> | |
</head> | |
<body> | |
<a data-alert='Hi!' href='http://google.com'>This link will not open</a> | |
<a data-lightbox="example-set" data-title="<a data-alert='Hi!' href='http://google.com'>But this will</a>" href="https://www.fillmurray.com/500/500"> | |
<img src="https://www.fillmurray.com/200/200"> | |
</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment