Support » Fixing WordPress » Trying to add Magnifying glass for Attachment

  • Xaib Aslam

    (@lahorimela)


    Hello,
    I am trying to add Magnifying Glass for attachment page but its not working, I dont what I am doing wrong. This is my code..

    <link rel=”stylesheet” href=”<?php echo get_template_directory_uri(); ?>/css/magnify.css”>
    <script src=”<?php echo get_template_directory_uri(); ?>/js/jquery.magnify.js”></script>
    <?php echo wp_get_attachment_image( get_the_ID(), array(‘full size’), “”, array( “class” => “magnify” ) ); ?>

    I am applying this code to my site…
    https://codepen.io/AGvin/pen/mqKsC

    Anyone help me to fix this…

Viewing 1 replies (of 1 total)
  • CrouchingBruin

    (@crouchingbruin)

    Can you please post a link to your attachment page?

    One thing you need to do is change the first line of the Javascript from this:

    
    $(document).ready(function(){
    

    to this;

    
    jQuery(document).ready(function($){
    
Viewing 1 replies (of 1 total)
  • The topic ‘Trying to add Magnifying glass for Attachment’ is closed to new replies.