Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Adding a jquery plugin on a blog post


Question

Site URL: https://www.meridianacademy.org/division3-humanities/2020/5/6/civil-rights-quilt

I'm trying to add the elevateZoom jquery plugin (https://www.elevateweb.co.uk/image-zoom/) to my site. I'm then trying to call it for a specific image on this page: https://www.meridianacademy.org/division3-humanities/2020/5/6/civil-rights-quilt.

I've uploaded the plugin as a link and added it to my site's head via code injection.

I then called it on the page via a codeblock:

<script>
$(document).on('ready', function () {
    $("#block-yui_3_17_2_1_1588791147485_100779").elevateZoom({
zoomType: "inner",
cursor: "crosshair",
zoomWindowFadeIn: 500,
zoomWindowFadeOut: 750
   }); 
});

</script>

But it does not seem to be working. Any help would be much appreciated. Thanks!

Link to post
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0

Yes--I believe so. I've added <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> to my head code injection site-wide. 

Link to post
  • 0

I'm trying to do the same thing to effect all shop product images with the following code but it is not working.

 

<script>
	$(document).on('ready', function () {
		$('#productList .product .product-image img, #productSlideshow .slide img').each(function () {
			$(this).attr('data-zoom-image',$(this).attr('data-image'));
				$("#productList .product .product-image img, #productSlideshow .slide img").elevateZoom();({cursor:"crosshair"});
    }):
 }):
</script>

 

Edited by LostBoy
Link to post
  • 0
On 11/8/2020 at 9:02 AM, LostBoy said:

I'm trying to do the same thing to effect all shop product images with the following code but it is not working.

 


<script>
	$(document).on('ready', function () {
		$('#productList .product .product-image img, #productSlideshow .slide img').each(function () {
			$(this).attr('data-zoom-image',$(this).attr('data-image'));
				$("#productList .product .product-image img, #productSlideshow .slide img").elevateZoom();({cursor:"crosshair"});
    }):
 }):
</script>

 

Try this

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
	$(document).on('ready', function () {
		$('#productList .product .product-image img, #productSlideshow .slide img').each(function () {
			$(this).attr('data-zoom-image',$(this).attr('data-image'));
				$("#productList .product .product-image img, #productSlideshow .slide img").elevateZoom();({cursor:"crosshair"});
    }):
 }):
</script>

 

You can send your question to my email to get detail answer. / How to Setup Password & Share URL 

-- I came back. Will answer soon.

Link to post
  • 0
18 hours ago, tuanphan said:

Try this


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
	$(document).on('ready', function () {
		$('#productList .product .product-image img, #productSlideshow .slide img').each(function () {
			$(this).attr('data-zoom-image',$(this).attr('data-image'));
				$("#productList .product .product-image img, #productSlideshow .slide img").elevateZoom();({cursor:"crosshair"});
    }):
 }):
</script>

 

Nope, nothing. 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...