Image Viewer

Developer
Size
2,115 Kb
Views
20,240

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 Previews

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");	}	});
});
Image Viewer - Script Codes
Image Viewer - Script Codes
Home Page Home
Developer Satnam Singh
Username rssatnam
Uploaded October 07, 2022
Rating 3
Size 2,115 Kb
Views 20,240
Do you need developer help for Image Viewer?

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!

Satnam Singh (rssatnam) Script Codes
Create amazing love letters with AI!

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!