Sunday, 19 July 2020
SHOPIFY JACK MOORE ZOOM
---------------------------------------------------------------------------------------------------------------------
SHOPIFY JACK MOORE ZOOM
JACK MOORE IMAGE ZOOM NEED JQUERY FILE ENQUIRE THROTTLE DEBOUNCE
IN SHOPIFY THEME
1.enquire.min.js
2.jquery.min.js
3.jquery.zoom.min.js
4.jquery.ba-throttle-debounce.min.js
JACK MOORE ZOOM CALL FUNCTINTON CAN WORKS WITH ID OR CLASS
<!-- LINE NUMBER REMOVE IN SHOPIFYCODE MIRROR
-->
OR WRITE THIS CODE INSPECT STYLE SHEET
.CodeMirror-linenumber { padding: 0 3px 0 5px; min-width: 20px; text-align: right; color: #999; -webkit-box-sizing: content-box; box-sizing: content-box; width: 28px; background: rgb(146, 153, 149); user-select: text; display: none; }
<div class="CodeMirror-gutter
CodeMirror-linenumbers" style="width: 28px;background: rgb(146, 153,
149);user-select: text;display: none;"></div>
--------------------------------------------------------------------------------------------------------------
<script>
$(document).ready(function(){
$('#ππ©π').zoom();
});
</script>
OR USE THIS
<script>
$(document).ready(function(){
$('.CssClass1').zoom();
});
</script>
---------------------------------------------------------------------------------------------------------------
OR USE THIS CODE WITHOUT FOR LOOP
{%- assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image -%}
---------------------------------------------------------------------------------------------------------------
<body><span id="ππ©π" class="CssClass1" style="position: relative; overflow: hidden;"><img src="https://www.jacklmoore.com/img/daisy.jpg" width="555" alt="Daisy on the Ohoopee"><p>Hover</p></span><span id="ππ©π" class="CssClass1" style="position: relative; overflow: hidden;"> {%- assign featured_image = product.featured_image -%}<imgdata-src="{{featured_image | img_url:'600x600'}}"src="{{featured_image |img_url:'300x300' }}"alt="{{ featured_image.alt | escape }}"><p>Hover</p></span></body>---------------------------------------------------------------------------------------------------------------
<html><head><!-- http://www.jacklmoore.com/zoom/ -->https://themes.shopify.com/themes/envy/styles/stockholm/previewhttps://github.com/sprout2000/leafview/blob/master/public/index.htmlhttps://cdn.shopify.com/s/files/1/0083/8654/3695/t/7/assets/jquery.zoom.min.js?v=12765501454049967912https://community.shopify.com/c/Script-Editor/Need-Img-Zoom-Script-JS-JQ-Theme-Cascade/td-p/512754<!-- https://guezal.com/collections/camisones-infantiles/products/camison-ondas-con-jaretas --><title>JACK MOORE ZOOM</title><style>/* styles unrelated to zoom */* { border:0; margin:0; padding:0; }p { position:absolute; top:3px; right:28px; color:#555; font:bold 13px/1 sans-serif;}/* these styles are for the demo, but are not required for the plugin */.CssClass1{display:inline-block;position: relative;}/* magnifying glass icon */.CssClass1:after {content:'';display:block;width:33px;height:33px;position:absolute;top:0;right:0;background:url(https://raw.githubusercontent.com/jackmoore/zoom/master/icon.png);}.CssClass1 img {display: block;}.CssClass1 img::selection { background-color: transparent; }#ex2 img:hover { cursor: url(grab.cur), default; }#ex2 img:active { cursor: url(grabbed.cur), default; }</style><style>div:not(.slick-slider)+.HideImageDivAboveOnImageSrcDiv{display:none;}</style><script src="https://www.jacklmoore.com/js/jquery.js"></script><script src="https://www.jacklmoore.com/js/jquery.zoom.js"></script><script>$(document).ready(function(){$('#ππ©π').zoom();});</script></head><body><span id="ππ©π" class="CssClass1" style="position: relative; overflow: hidden;"><img src="https://www.jacklmoore.com/img/daisy.jpg" width="555" alt="Daisy on the Ohoopee"><p>Hover</p></span>{% for image in product.images %}
<div class="HideImageDivAboveOnImageSrcDiv">
<span id="ππ©π" class="CssClass1" style="position: relative; overflow: hidden;">
<img
data-src="{{image|img_url:'600x600'}}"
src="{{image|img_url:'300x300' }}"
alt="{{image.alt|escape }}">
<p>Hover</p>
</span>
</div>
{% endfor %}
</body></html>-----------------------------------------------------------------------------------------
PRODUCT TEMPLATE LIQUID CODE WE NEED JAVA SCRIPT FILES
WE NEED TWO IMAGES ONE IS 480X480 AND 1024X1024
REAL SHOPHIFY CODE WAS LOOKED WHICH WE NEED TO CHANGE
{% for image in product.images %} <img id="{{ img_id }}" class="feature-row__image {{ img_class }} lazyload{% unless featured_image == image %} lazypreload{% endunless %}" src="{{ image | img_url: '300x300' }}" data-src="{{ img_url }}" data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]" data-aspectratio="{{ image.aspect_ratio }}" data-sizes="auto" tabindex="-1" alt="{{ image.alt | escape }}"> {% endfor %}
---------------------------------------------------------------------------------<style>div:not(.slick-slider)+.HideImageDivAboveOnImageSrcDiv{display:none;}</style>{% for image in product.images %} <div class="HideImageDivAboveOnImageSrcDiv"><imgdata-src="{{image|img_url:'600x600'}}"src="{{image|img_url:'300x300' }}"alt="{{image.alt|escape }}"></div>{% endfor %}-----------------------------------------------------------------------
THUMBNAIL CLICK IN SHOPIFY DEBUT THEMEclass="product-single__photo" class="product-single__thumbnails-
class="product-single__thumbnail-- USE IN THEME JS FILE
-----------------------------------------------------------------------
<div class="product-template__container page-width"id="ProductSection-{{ section.id }}"data-section-id="{{ section.id }}"data-section-type="product"data-enable-history-state="true">{% for image in product.images %}<div class="product-single__photo" data-image-id="{{ image.id }}"><imgdata-src="{{image|img_url:'600x600'}}"src="{{image|img_url:'300x300' }}"alt="{{image.alt|escape }}"> </div>{% endfor %}<ul class="product-single__thumbnails-{{ section.id }}"> {% for image in product.images %}<a href="{{image|img_url:'1024x1024'}}"class="product-single__thumbnail--{{ section.id }}"data-thumbnail-id="{{ image.id }}"> <imgdata-src="{{image|img_url:'600x600'}}"src="{{image|img_url:'300x300' }}"alt="{{image.alt|escape }}"> </a> {% endfor %} </ul> </div></div>{% unless product == empty %}<script type="application/json" id="ProductJson-{{ section.id }}">{{ product | json }}</script>{% endunless %}
------------------------------------------------------------------------------
<!-- https://shopify.dev/tutorials/customize-theme-update-theme-to-use-variant-images#updating-product-liquid-to-support-variant-images --><div class="product-template__container page-width"id="ProductSection-{{ section.id }}"data-section-id="{{ section.id }}"data-section-type="product"data-enable-history-state="true"><style>
.hide{display:none;}
</style>{%- assign featured_image = product.selected_or_first_available_variant.featured_image | default: product.featured_image -%}{% for image in product.images %}<divid="FeaturedImageZoom-product-template-11008677118045"style="position:relative;overflow:hidden;"class="product-single__photo{% unless featured_image == image %} hide{% endunless %}"><imgdata-src="{{image | img_url: '600x600'}}"src="{{ image | img_url: '300x300' }}"alt="{{ image.alt | escape }}"></div>{% endfor %}</div>-------------------------------------------------------------------------- IMAGE WRITE IN TWO WAYS IN SHOPIFY WITH A LINK OR WITHOUT A LINK-------------------------------------------------------------------------<img
src="{{ image | img_url: '300x300' }}"
data-src="{{image | img_url: '1024x1024'}}"
alt="{{ image.alt | escape }}">
<a href="{{image|img_url:'1024x1024'}}" >
<img src="{{image|img_url:'300x300' }}" alt="{{image.alt | escape }}">
</a>
src="{{ image | img_url: '480x480' }}"
data-src="{{ image | img_url: '1024x1024' }}"--------------------------------------------------------------------------------------SEPARATE JACK MOORE ZOOM FILE IN SHOPIFY DEBUT THEME
REMOVE COMMA , AT END YOUR CODE
PASTE YOUR ZOOM CODE AFTER EXCLAMATION MARK AND BEFORE Semicolon
!
YOUR ZOOM CODE WITHOUT END COMMA
,
;
---------------------------------------------------------------------------------------OR USE THIS CODE--------------------------------------------------------------------------------------{{'https://www.jacklmoore.com/js/jquery.zoom.js'|script_tag }}
<script>
$(document).ready(function(){
$('.product-single__photo').zoom();
});
</script>
<style>
/* magnifying glass icon */
.product-single__photo:after {
content:'';
display:block;
width:33px;
height:33px;
position:absolute;
top:0;
right:0;
background:url(https://raw.githubusercontent.com/jackmoore/zoom/master/icon.png);
}
</style>=============================================================================================USE DOCUMENT READY FUNCTION LINE FOR JAVASCRIPT <!--ππKEEP IN MIND REMOVE THEME CSS FILE LINK IN THEME LIQUID -->
<!---ππ{{ 'theme.css' | asset_url | stylesheet_tag }}-->=============================================================================================<div class="product-template__container page-width"
id="ProductSection-{{ section.id }}"
data-section-id="{{ section.id }}"
data-section-type="product"
data-enable-history-state="true"
>
{{'https://www.jacklmoore.com/js/jquery.js'|script_tag}}
{{'https://www.jacklmoore.com/js/jquery.zoom.js'|script_tag }}
<script>
$(document).ready(function(){
$('#FeaturedImageZoom-product-template-11008677118045').zoom();
});
</script>
<style>
/* styles unrelated to zoom */
* { border:0; margin:0; padding:0; }
p { position:absolute; top:3px; right:28px; color:#555; font:bold 13px/1 sans-serif;}
/* these styles are for the demo, but are not required for the plugin */
.product-single__photo {
display:inline-block;
position: relative;
}
/* magnifying glass icon */
.product-single__photo:after {
content:'';
display:block;
width:33px;
height:33px;
position:absolute;
top:0;
right:0;
background:url(https://raw.githubusercontent.com/jackmoore/zoom/master/icon.png);
}
.product-single__photo img {
display: block;
}
.product-single__photo img::selection { background-color: transparent; }
#ex2 img:hover { cursor: url(grab.cur), default; }
#ex2 img:active { cursor: url(grabbed.cur), default; }
</style>
{% for image in product.images %}
<div id="FeaturedImageZoom-product-template-11008677118045" class="product-single__photo" style="position:relative;overflow:hidden;">
<img
src="{{ image | img_url: '300x300' }}"
data-src="{{image | img_url: '600x600'}}"
alt="{{ image.alt | escape }}"><p>Hover</p>
</div>
{% endfor %}
</div>
================================================================================================USE DOCUMENT READY FUNCTION LINE FOR JAVASCRIPT<!--ππKEEP IN MIND REMOVE THEME CSS FILE LINK IN THEME LIQUID --> <!---ππ{{ 'theme.css' | asset_url | stylesheet_tag }}-->================================================================================================<div class="product-template__container page-width" id="ProductSection-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="product" data-enable-history-state="true" > {{'https://code.jquery.com/jquery-3.1.1.min.js'|script_tag}} {{'https://i-like-robots.github.io/EasyZoom/dist/easyzoom.js'|script_tag}} <!--ππKEEP IN MIND REMOVE THEME CSS FILE LINK IN THEME LIQUID --> <!---ππ{{ 'theme.css' | asset_url | stylesheet_tag }}-->{{'https://i-like-robots.github.io/EasyZoom/css/easyzoom.css'|stylesheet_tag }} <script> $(document).ready(function(){ // Instantiate EasyZoom instances var $easyzoom = $('.easyzoom').easyZoom(); // Setup thumbnails example var api1 = $easyzoom.filter('.easyzoom--with-thumbnails').data('easyZoom'); $('.thumbnails').on('click', 'a', function(e) { var $this = $(this); e.preventDefault(); // Use EasyZoom's `swap` method api1.swap($this.data('standard'), $this.attr('href')); }); // Setup toggles example var api2 = $easyzoom.filter('.easyzoom--with-toggle').data('easyZoom'); $('.toggle').on('click', function() { var $this = $(this); if ($this.data("active") === true) { $this.text("Switch on").data("active", false); api2.teardown(); } else { $this.text("Switch off").data("active", true); api2._init(); } }); }); </script> {% for image in product.images %} <div class="easyzoom easyzoom--overlay"> <a href="{{image|img_url:'1024x1024'}}" > <img src="{{image|img_url:'640x360' }}" alt="{{image.alt | escape }}"> </a> </div> {%endfor%} </div>====================================================================================
USE SHOPIFY JACK MOORE ZOOM CODE
BECAUSE THIS CODE SOME ERROR ESPECIALLY FIRST LINE ERROR
function(t) --------> (function(t)(window.jQuery) --------> )(window.jQuery)
------------------------------------------------------------------------------------------
<html lang="en">
<!-- http://www.jacklmoore.com/zoom/ -->
https://themes.shopify.com/themes/envy/styles/stockholm/preview
https://github.com/sprout2000/leafview/blob/master/public/index.html
https://cdn.shopify.com/s/files/1/0083/8654/3695/t/7/assets/jquery.zoom.min.js?v=12765501454049967912
https://community.shopify.com/c/Script-Editor/Need-Img-Zoom-Script-JS-JQ-Theme-Cascade/td-p/512754
<!-- https://guezal.com/collections/camisones-infantiles/products/camison-ondas-con-jaretas -->
<head>
<title>JACK MOORE ZOOM</title>
<style>
/* styles unrelated to zoom */
* { border:0; margin:0; padding:0; }
p { position:absolute; top:3px; right:28px; color:#555; font:bold 13px/1 sans-serif;}
/* these styles are for the demo, but are not required for the plugin */
.zoom {
display:inline-block;
position: relative;
}
/* magnifying glass icon */
.zoom:after {
content:'';
display:block;
width:33px;
height:33px;
position:absolute;
top:0;
right:0;
background:url(icon.png);
}
.zoom img {
display: block;
}
.zoom img::selection { background-color: transparent; }
#ex2 img:hover { cursor: url(grab.cur), default; }
#ex2 img:active { cursor: url(grabbed.cur), default; }
</style>
<script src="http://www.jacklmoore.com/js/jquery.js"></script>
<!-- <script src="https://cdn.shopify.com/s/files/1/0042/9811/3117/t/26/assets/vendor.js?v=15787665242741466737"></script>
-->
<script>
/*!
* jquery.zoom.min.js
*/
/*!
Zoom 1.7.14
license: MIT
http://www.jacklmoore.com/zoom
CODE GOT FROM SHOPIFY SUPPLY THEME
Modified to include fixes on 2015-09-14.
*/
(function(t) {
var e = {
url: !1,
callback: !1,
target: !1,
duration: 120,
on: "mouseover",
touch: !0,
onZoomIn: !1,
onZoomOut: !1,
magnify: 1
};
t.zoom = function(e, n, i, r) {
var o, s, a, c, l, u, p, h = t(e), d = h.css("position"), f = t(n);
return h.css("position", /(absolute|fixed)/.test(d) ? d : "relative"),
h.css("overflow", "hidden"),
i.style.width = i.style.height = "",
t(i).addClass("zoomImg").css({
position: "absolute",
top: 0,
left: 0,
opacity: 0,
width: i.width * r,
height: i.height * r,
border: "none",
maxWidth: "none",
maxHeight: "none"
}).appendTo(e),
{
init: function() {
s = h.outerWidth(),
o = h.outerHeight(),
n === h[0] ? (c = s,
a = o) : (c = f.outerWidth(),
a = f.outerHeight()),
l = (i.width - s) / c,
u = (i.height - o) / a,
p = f.offset()
},
move: function(t) {
var e = t.pageX - p.left
, n = t.pageY - p.top;
n = Math.max(Math.min(n, a), 0),
e = Math.max(Math.min(e, c), 0),
i.style.left = e * -l + "px",
i.style.top = n * -u + "px"
}
}
}
,
t.fn.zoom = function(n) {
return this.each(function() {
var i, r = t.extend({}, e, n || {}), o = r.target || this, s = this, a = t(s), c = t(o), l = document.createElement("img"), u = t(l), p = "mousemove.zoom", h = !1, d = !1;
(r.url || (i = a.find("img"),
i[0] && (r.url = i.data("src") || i.attr("src")),
r.url)) && (!function() {
var t = c.css("position")
, e = c.css("overflow");
a.one("zoom.destroy", function() {
a.off(".zoom"),
c.css("position", t),
c.css("overflow", e),
u.remove(),
l.onload = null
})
}(),
l.onload = function() {
function e(e) {
i.init(),
i.move(e),
u.stop().fadeTo(t.support.opacity ? r.duration : 0, 1, !!t.isFunction(r.onZoomIn) && r.onZoomIn.call(l))
}
function n() {
u.stop().fadeTo(r.duration, 0, !!t.isFunction(r.onZoomOut) && r.onZoomOut.call(l))
}
var i = t.zoom(o, s, l, r.magnify);
"grab" === r.on ? a.on("mousedown.zoom", function(r) {
1 === r.which && (t(document).one("mouseup.zoom", function() {
n(),
t(document).off(p, i.move)
}),
e(r),
t(document).on(p, i.move),
r.preventDefault())
}) : "click" === r.on ? a.on("click.zoom", function(r) {
return h ? void 0 : (h = !0,
e(r),
t(document).on(p, i.move),
t(document).one("click.zoom", function() {
n(),
h = !1,
t(document).off(p, i.move)
}),
!1)
}) : "toggle" === r.on ? a.on("click.zoom", function(t) {
h ? n() : e(t),
h = !h
}) : "mouseover" === r.on && (i.init(),
a.on("mouseover.zoom", e).on("mouseleave.zoom", n).on(p, i.move)),
r.touch && a.on("touchstart.zoom", function(t) {
t.preventDefault(),
d ? (d = !1,
n()) : (d = !0,
e(t.originalEvent.touches[0] || t.originalEvent.changedTouches[0]))
}).on("touchmove.zoom", function(t) {
t.preventDefault(),
i.move(t.originalEvent.touches[0] || t.originalEvent.changedTouches[0])
}),
t.isFunction(r.callback) && r.callback.call(l)
}
,
l.src = r.url)
})
}
,
t.fn.zoom.defaults = e
})(window.jQuery);
</script>
<script>
$(document).ready(function(){
$('#ex1').zoom();
});
</script>
</head>
<body>
<div class="zoom" id="ex1" style="position: relative; overflow: hidden;">
<img src="http://www.jacklmoore.com/img/daisy.jpg" width="555" alt="Daisy on the Ohoopee">
</div>
</div>
</body>
</html>----------------------------------------------------------------------------------------
SHOPIFY IMAGE INNER ZOOM
http://fbgadgets.blogspot.com/2020/05/shopify-theme-slider-edit.html
-----------------------------------------------------------------------------------------
HTML CODE CHANGE INTO SHOPIFY CODE
-----------------------------------------------------------------------------------------
<img class="image-zoom" src="480x480.jpg" alt="Camp Stool"
data-product-featured-image data-zoom="1024x1024.jpg">
<img class="image-zoom" src="{{image|img_url:'480x480'}}"alt="{{image.alt|escape }}"
data-product-featured-image data-zoom="{{image|img_url:'1024x1024'}}">-----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
<html> <!-- https://www.shopify.co.uk/partners/blog/jquery-image-zoom --> <head> <link href="https://cdn.shopify.com/s/files/1/2261/4707/t/2/assets/theme.scss.css?v=15521285290808567413" rel="stylesheet" type="text/css" media="all"/> <script src="https://cdn.shopify.com/s/files/1/2261/4707/t/2/assets/vendor.js?v=10503683447685548416" defer="defer"></script> <script type="text/javascript" src="https://cdn.shopify.com/s/files/1/2261/4707/t/2/assets/jquery.zoom.min.js?v=13038990187238013756" defer="defer"></script> <script src="https://cdn.shopify.com/s/files/1/2261/4707/t/2/assets/theme.js?v=5879221024247043080" defer="defer"></script> </head> <body> <div class="image-container"> <img class="image-zoom" src="https://cdn.shopify.com/s/files/1/2261/4707/products/campstool-1_480x480.jpg?v=1502376039" alt="Camp Stool" data-product-featured-image data-zoom="https://cdn.shopify.com/s/files/1/2261/4707/products/campstool-1_1024x1024@2x.jpg?v=1502376039"> <div class="image-details"></div> </div> </body> </html>
-----------------------------------------------------------------------------------------
Read More
https://sites.google.com/site/javafilesblogger/slick-slider-1
-----------------------------------------------------------------------------------------
<!DOCTYPE html><html lang="en"><head><title>slick - the last carousel you'll ever need</title>+------------------------------------------------------------------------------------------------------------------------+| <!-- https://ozh.github.io/ascii-tables/ --> |+------------------------------------------------------------------------------------------------------------------------+| <link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'> || <link rel="stylesheet" type="text/css" href="https://kenwheeler.github.io/slick/slick/slick.css" /> || <link rel="stylesheet" type="text/css" href="https://kenwheeler.github.io/slick/slick/slick-theme.css" /> || <link rel="stylesheet" type="text/css" href="https://kenwheeler.github.io/slick/css/style.css"> || <link rel="stylesheet" type="text/css" href="https://kenwheeler.github.io/slick/css/prism.css" /> || <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js" type="text/javascript"></script> || <script src="https://kenwheeler.github.io/slick/js/native.js" type="text/javascript"></script> |+------------------------------------------------------------------------------------------------------------------------+</head><body><section id="features" class="blue"><div class="content"><hr id="demos" /><h2>Single Item</h2><div class="slider single-item"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div></div><hr/><h2>Multiple Items</h2><div class="slider multiple-items"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div><div><h3>7</h3></div><div><h3>8</h3></div><div><h3>9</h3></div></div><hr/><h2>Responsive Display</h2><div class="slider responsive"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div><div><h3>7</h3></div><div><h3>8</h3></div></div><hr/><h2>Variable Width</h2><div class="slider variable-width"><div style="width: 200px;"><p>200</p></div><div style="width: 175px;"><p>175</p></div><div style="width: 150px;"><p>150</p></div><div style="width: 300px;"><p>300</p></div><div style="width: 225px;"><p>225</p></div><div style="width: 125px;"><p>125</p></div></div><hr/><h2>Adaptive Height</h2><div class="slider one-time"><div><h3>1</h3></div><div><h3>2</h3><p>Look ma!</p></div><div><h3>3</h3><p>Check<br/>this out!</p></div><div><h3>4</h3><p>Woo!</p></div></div><hr/><h2>Data Attribute Settings</h2><p>In slick 1.5 you can now add settings using the data-slick attribute. You still need to call $(element).slick() to initializeslick on the element.</p><div class="data" data-slick='{"slidesToShow": 4, "slidesToScroll": 4}'><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div></div><hr/><h2>Center Mode</h2><div class="slider center"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div></div><hr/><h2>Lazy Loading</h2><div class="slider lazy"><div><div class="image"><img data-lazy="https://kenwheeler.github.io/slick/img/lazyfonz1.png" /></div></div><div><div class="image"><img data-lazy="https://kenwheeler.github.io/slick/img/lazyfonz2.png" /></div></div><div><div class="image"><img data-lazy="https://kenwheeler.github.io/slick/img/lazyfonz3.png" /></div></div><div><div class="image"><img data-lazy="https://kenwheeler.github.io/slick/img/lazyfonz4.png" /></div></div><div><div class="image"><img data-lazy="https://kenwheeler.github.io/slick/img/lazyfonz5.png" /></div></div><div><div class="image"><img data-lazy="https://kenwheeler.github.io/slick/img/lazyfonz6.png" /></div></div></div><hr/><h2>Autoplay</h2><div class="slider autoplay"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div></div><hr/><h2>Fade</h2><div class="slider fade"><div><div class="image"><img src="https://kenwheeler.github.io/slick/img/fonz1.png" /></div></div><div><div class="image"><img src="https://kenwheeler.github.io/slick/img/fonz2.png" /></div></div><div><div class="image"><img src="https://kenwheeler.github.io/slick/img/fonz3.png" /></div></div></div><hr/><h2>Add & Remove</h2><div class="slider add-remove"><div><h3>1</h3></div></div><div class="buttons"><a href="javascript:void(0)" class="button js-add-slide">Add Slide</a><a href="javascript:void(0)" class="button js-remove-slide">Remove Slide</a></div><hr/><h2>Filtering</h2><div class="slider filtering"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div><div><h3>7</h3></div><div><h3>8</h3></div><div><h3>9</h3></div><div><h3>10</h3></div><div><h3>11</h3></div><div><h3>12</h3></div></div><div class="filter"><a href="javascript:void(0)" class="button js-filter">Filter Slides</a></div><hr/><h2>Destroy</h2><p class="destroy">If you really want to be that guy...</p><hr/><h2>Slider Syncing</h2><div class="slider slider-for"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div></div><div class="slider slider-nav"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div></div><hr /><h2>Right to Left</h2><div dir="rtl" class="slider single-item-rtl"><div><h3>1</h3></div><div><h3>2</h3></div><div><h3>3</h3></div><div><h3>4</h3></div><div><h3>5</h3></div><div><h3>6</h3></div></div><p><strong>Note:</strong> the HTML tag or the parent of the slider must have the attribute "dir" set to "rtl".</p><hr /><h4 class="more">and a whole lot more...</h4></div></section>π₯π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π₯ <script src="https://code.jquery.com/jquery-1.11.0.min.js"></script> π₯π₯π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π₯ <script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> π₯π₯ <script type="text/javascript" src="https://kenwheeler.github.io/slick/slick/slick.js"></script> π₯π₯ <script type="text/javascript" src="https://kenwheeler.github.io/slick/js/scripts.js"></script> π₯π₯ <script type="text/javascript" src="https://kenwheeler.github.io/slick/js/prism.js"></script> π₯π₯π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½π½</body>------------------------------------------------------------------------------------------IMAGE ZOOM IN BLOGGER TEMPLATE WITH CHATGPT------------------------------------------------------------------------------------------
<div id='img-zoom-container'> <data:post.body/> <div id='zoom-result' class='img-zoom-result'></div> </div> <style> .img-zoom-lens { position: absolute; border: 1px solid #ccc; width: 100px; height: 100px; pointer-events: none; opacity: 0.4; background-color: white; z-index: 100; } .img-zoom-result { border: 1px solid #ccc; width: 300px; height: 300px; background-repeat: no-repeat; position: relative; margin-top: 15px; } .img-zoom-wrapper { position: relative; display: inline-block; } </style> <script> function initImageZoom(image, result) { const wrapper = document.createElement('div'); wrapper.classList.add('img-zoom-wrapper'); image.parentNode.insertBefore(wrapper, image); wrapper.appendChild(image); const lens = document.createElement('div'); lens.classList.add('img-zoom-lens'); wrapper.appendChild(lens); const cx = result.offsetWidth / lens.offsetWidth; const cy = result.offsetHeight / lens.offsetHeight; result.style.backgroundImage = "url('" + image.src + "')"; result.style.backgroundSize = (image.width * cx) + "px " + (image.height * cy) + "px"; lens.addEventListener('mousemove', moveLens); image.addEventListener('mousemove', moveLens); lens.addEventListener('touchmove', moveLens); image.addEventListener('touchmove', moveLens); function moveLens(e) { e.preventDefault(); const pos = getCursorPos(e, image); let x = pos.x - lens.offsetWidth / 2; let y = pos.y - lens.offsetHeight / 2; // Clamp lens within image if (x > image.width - lens.offsetWidth) x = image.width - lens.offsetWidth; if (x < 0) x = 0; if (y > image.height - lens.offsetHeight) y = image.height - lens.offsetHeight; if (y < 0) y = 0; lens.style.left = x + 'px'; lens.style.top = y + 'px'; result.style.backgroundPosition = '-' + (x * cx) + 'px -' + (y * cy) + 'px'; } function getCursorPos(e, img) { e = e || window.event; const rect = img.getBoundingClientRect(); const x = e.pageX - rect.left - window.pageXOffset; const y = e.pageY - rect.top - window.pageYOffset; return { x, y }; } } document.addEventListener('DOMContentLoaded', function () { const container = document.getElementById('img-zoom-container'); const result = document.getElementById('zoom-result'); const images = container.querySelectorAll('img'); if (images.length > 0) { // Apply zoom to the first image only initImageZoom(images[0], result); } }); </script>
------------------------------------------------------------------------------------------OR USE THIS CODE------------------------------------------------------------------------------------------<div id='img-zoom-container'> <data:post.body/> </div> <script> document.addEventListener("DOMContentLoaded", function () { const images = document.querySelectorAll("#img-zoom-container img"); images.forEach(img => { img.addEventListener("mouseenter", function () { this.style.transform = "scale(2)"; this.style.zIndex = "999"; this.style.position = "relative"; }); img.addEventListener("mouseleave", function () { this.style.transform = "scale(1)"; this.style.zIndex = ""; this.style.position = ""; }); }); }); </script> <style> #img-zoom-container img { transition: transform 0.3s ease; cursor: zoom-in; } #img-zoom-container img:hover { transform: scale(1.5); /* Zoom level */ z-index: 999; position: relative; } </style>
------------------------------------------------------------------------------------------ where use imagezoom class in shopify with lazy loaded <span style="display: inline-block; position: relative; overflow: hidden;"><img id="ProductPhotoImg" class="image-zoom lazyautosizes lazyloaded" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-image="//cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasazul_600x600.jpg?v=1585433119" data-widths="[180, 360, 590, 720, 900, 1080, 1296, 1512, 1728, 2048]" data-aspectratio="0.6013853904282116" data-sizes="auto" data-image-id="14448860299343" alt="" data-zoom="//cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1024x1024@2x.jpg?v=1585433119" data-product-featured-image="" style="display: block;" data-srcset="//cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_180x.jpg?v=1585433119 180w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_360x.jpg?v=1585433119 360w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_590x.jpg?v=1585433119 590w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_720x.jpg?v=1585433119 720w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_900x.jpg?v=1585433119 900w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1080x.jpg?v=1585433119 1080w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1296x.jpg?v=1585433119 1296w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1512x.jpg?v=1585433119 1512w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1728x.jpg?v=1585433119 1728w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_2048x.jpg?v=1585433119 2048w" sizes="438px" srcset="//cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_180x.jpg?v=1585433119 180w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_360x.jpg?v=1585433119 360w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_590x.jpg?v=1585433119 590w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_720x.jpg?v=1585433119 720w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_900x.jpg?v=1585433119 900w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1080x.jpg?v=1585433119 1080w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1296x.jpg?v=1585433119 1296w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1512x.jpg?v=1585433119 1512w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1728x.jpg?v=1585433119 1728w, //cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_2048x.jpg?v=1585433119 2048w"><img role="presentation" alt="" src="//cdn.shopify.com/s/files/1/0083/8654/3695/products/OndasJaretasrosa_1024x1024@2x.jpg?v=1585433119" class="zoomImg" style="position: absolute; top: -570.641px; left: -446.182px; opacity: 0; border: none; max-width: none; max-height: none; width: 918px; height: 1599px;"></span>
---------------------------------------------------------------------------------------------------------------------
?
+
X
Recommended for you
Loading..
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment