Pure JavaScript code snippet for image zoom. Focused on simplicity of code for now.
npx serve
┌───────────────────────────────────────────────────┐
│ │
│ Serving! │
│ │
│ - Local: http://localhost:3000 │
│ - On Your Network: http://192.168.1.101:3000 │
│ │
│ Copied local address to clipboard! │
│ │
└───────────────────────────────────────────────────┘
Basic usage example
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<img src="https://i.ibb.co/GscR76j/jen-p-Fo-G8lotg7-AA-unsplash.jpg" alt="">
<script type="text/javascript" src="zoom.js"></script>
</body>
</html>
- work for image tag directly which means it can be applied to all image elements wrapped by other tags
- auto deployment to heroku with github action
This is a quick solution and still needs to be improved for being a library.
Looking forward pull request from experienced developers!
Hope you enjoy using it!