Image Viewer
How do I make an image viewer?
Image Viewer with 4 thumbnails. What is a image viewer? How do you make a image viewer? This script and codes were developed by Satnam Singh on 07 October 2022, Friday.
Image Viewer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Image Viewer</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container"> <div id="slider"> <div id="bigImage"> <img src="https://i.imgur.com/9PvFFtx.jpg" width="800" height="800" /> </div> <div id="thumbnails"> <a href="#"><img src="https://i.imgur.com/9PvFFtx.jpg" width="800" height="800" /></a> <a href="#"><img src="https://i.imgur.com/GLs7ru3.jpg" width="800" height="800" /></a> <a href="#"><img src="https://i.imgur.com/HbMKIBt.jpg" width="800" height="800" /></a> <a href="#"><img src="https://i.imgur.com/bQ5Y0Uf.jpg" width="800" height="800" /></a> </div> </div> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Image Viewer - Script Codes CSS Codes
*, body{ margin:0; padding:0; background-color:#333;
}
div#container{ margin:0 auto; width:800px;
}
div#bigImage img{ width:600px; height:600px;
}
div#bigImage,div#thumbnails{ text-align:center;
}
div#thumbnails img{ width:150px; height:150px; border:10px solid #666; transition:all 1s; -webkit-transition:all 1s;
}
div#thumbnails a img:hover{ border-color:#0FC;
}
Image Viewer - Script Codes JS Codes
$(document).ready(function(e) { var previousImg=$("div#thumbnails a img:first"); previousImg.css("border-color", "#0FC"); $("a").click(function(){ var myImage=$(this).html(); $("div#bigImage").html(myImage); $("div#bigImage").css("opacity", "0"); $("div#bigImage").animate({opacity:"1"},"2000"); }); $("div#thumbnails a img").click(function(){ previousImg.css("border-color", "#666"); previousImg=$(this); previousImg.css("border-color", "#0FC"); }); $("div#thumbnails a img").hover(function(){ $(this).css("border-color", "#0FC"); },function(){ if($(this).css("border-color")==previousImg.css("border-color")){ $(this).css("border-color", "#0FC"); } else{ $(this).css("border-color", "#666"); } });
});
Developer | Satnam Singh |
Username | rssatnam |
Uploaded | October 07, 2022 |
Rating | 3 |
Size | 2,115 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Name Hover Bubble Animation | 1,639 Kb |
Navigation Slider | 2,107 Kb |
CSS Image Parallax Effect | 2,232 Kb |
CSS Ribbon | 1,903 Kb |
Giving Strike, Del or S elements a Color | 1,505 Kb |
CSS3 Form Page Design | 3,613 Kb |
Pure CSS3 Drop-down Navigation with Effects | 2,262 Kb |
JavaScript Reference Type | 1,984 Kb |
A Pen by Satnam Singh | 11,360 Kb |
Menu Hover Animation | 2,057 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by utcwebdev | Utcwebdev | 2,856 Kb |
Simple Buttons | Haydenmills | 1,750 Kb |
Example SVGZ Data URI | Joeyhoer | 2,981 Kb |
Fun animations with CSS3 | Minimalmonkey | 2,360 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Heatmap Color Scales | Stevepepple | 2,331 Kb |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
Hc first draft | Stepfray | 5,104 Kb |
Main page display | BarryKe | 4,562 Kb |
Boom | Mhrjnsa1 | 1,794 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!