<html>
<head>
<meta charset=utf-8 />
<title>Image popup fun</title>
<style>
#idLargePicturePopupWindow {
position: absolute;
background: white;
border: 3px double blue;
margin: 1ex;
opacity: 1.0;
z-index: 1222;
min-height: 100px;
min-width: 200px;
padding: 0;
display: none;
top: 10em;
left: 10em;
}
#idLargePicturePopupWindow img {
margin: 0;
margin-bottom: -4px;
padding: 0;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready (jQueryMain);
function jQueryMain () {
$("body").append ('<div id="idLargePicturePopupWindow"><img></div>');
$('#idLargePicturePopupWindow').bind (
"mouseenter mouseleave",
{bInPopup: true},
myImageHover
);
$('#profPhotos .profPhotoLink > img').bind (
"mouseenter mouseleave",
{bInPopup: false},
myImageHover
);
function myImageHover (zEvent) {
if (zEvent.type == 'mouseenter') {
if ( ! zEvent.data.bInPopup) {
var imgurl = this.src.toString();
//need to replace '/thumbs/75x60/' part with '/photos/' to get the full size image
var bigimg = imgurl.replace(/\/thumbs\/[0-9x]+\//i, "/photos/");
$("#idLargePicturePopupWindow img").attr ('src', bigimg);
}
$("#idLargePicturePopupWindow").show ();
}
else {
$("#idLargePicturePopupWindow").hide ();
}
}
}
</script>
</head>
<body>
<div id="profPhotos">
<a class="profPhotoLink" href="photo.php?pid=9223981&uid=1319044306">
<img width="95" height="130" src="http://th0.max.ipstatic.net/thumbs/163x130/8f/fd/588x800_1319044306_9223981.jpg">
</a>
<br>
<a class="profPhotoLink" href="photo.php?pid=9254715&uid=1319044306">
<img width="75" height="60" src="http://th2.max.ipstatic.net/thumbs/75x60/f0/d9/604x453_1319044306_9254715.jpg">
</a>
<a class="profPhotoLink" href="photo.php?pid=9237298&uid=1319044306">
<img width="45" height="60" src="http://th0.max.ipstatic.net/thumbs/75x60/fc/2a/600x800_1319044306_9237298.jpg">
</a>
<a class="profPhotoLink" href="photo.php?pid=9237297&uid=1319044306">
<img width="45" height="60" src="http://th0.max.ipstatic.net/thumbs/75x60/1d/91/600x800_1319044306_9237297.jpg">
</a>
<a class="profPhotoLink" href="photo.php?pid=9217873&uid=1319044306">
<img width="45" height="60" src="http://th0.max.ipstatic.net/thumbs/75x60/ff/5b/600x800_1319044306_9217873.jpg">
</a>
<br>
</div>
</body>
</html>
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |