Last active
May 20, 2018 21:45
-
-
Save geetfun/ab6b2a8c9f37f9c47e759c4207dcb748 to your computer and use it in GitHub Desktop.
Champ App - Enlarge post images in new tab
This file contains hidden or 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
<style type="text/css"> | |
.post img:hover { | |
cursor: pointer; | |
} | |
</style> | |
<script type="text/javascript"> | |
$(function() { | |
$(document).on("click", ".post img", function(e) { | |
var $this = $(this); | |
var newWindow = window.open($this.prop("src"), '_blank'); | |
newWindow.focus(); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment