Forums

Javascipt Image Zoom & WordPress (12 posts)

  1. macart
    Member
    Posted 2 years ago #

    Has anyone in here been able to get a Javascript Image Zoom to work on a WordPress page? If so and you would care to share I would appreciate it.

    Here are examples of Image Zoom:

    http://www.mind-projects.it/jqzoom_v10

    http://www.nihilogic.dk/labs/mojozoom/

    Thanks

  2. @mercime
    Member
    Posted 2 years ago #

    At this stage, you would need a plugin developer to make sure that javascript/jquery scripts in any other application do not conflict with the scripts that WordPress natively has in all installations. While those are cool tools and easy to apply to HTML sites, WordPress is another challenge altogether despite its many many favorable points.

    Why not check out the image zoom - or close to it - WordPress plugins we have like http://wordpress.org/extend/plugins/random-image-gallery-with-fancy-zoom/ or other zoom plugins etc

  3. alism
    Member
    Posted 2 years ago #

    I've just tried it on my test blog and it seemed to work fine.

    Upload the mojozoom.css and mojozoom.js into your theme folder.
    Copy and paste the 'Step 1' code into your header.php file (from the link you gave above), between the <head> tags.
    Edit the code to reflect the full path of both of those mojozoom.css and mojozoom.js files.
    Go to the page/post you want to edit.
    Switch to HTML mode.
    Upload the image you want to zoom on.
    Make a note of the full url.
    Paste the zoom code into the editor (the third piece of code also given on that page you linked to - ie the piece with the divs and styles etc).
    Edit that code to reflect the full url of your image.

    Publish/Preview. Sorted. But yes, you should check for incompatibilities etc as mercime suggested.

  4. @mercime
    Member
    Posted 2 years ago #

    Good one alism! Good luck macart. I believe it would help in the process if you do not have any other plugin activated in your install. Then activate your necessary or required plugins one by one to see which might conflict with mojozoom.

  5. macart
    Member
    Posted 2 years ago #

    Thank you, Thank you, Thank you! For the reply.
    Ok, Im still doing something wrong.
    My page has a dot on it, when I rollover the dot, I get
    part of the zoom.

    My WordPress page html:
    http://wordpress.pastebin.com/m2b0a73bc

    mojozoom.css and mojozoom.js are both in my theme folder,
    addresses look to be correct, they are below.
    http://wordpress.pastebin.com/m1868a605

    My mojozoom.css
    http://wordpress.pastebin.com/m308422a2

    Thanks

  6. alism
    Member
    Posted 2 years ago #

    You've pasted the code wrongly, this section:

    <img src=href="http://mysite.com...

    needs the extra "=href" removing, to look like:

    <img src="http://mysite.com...
  7. macart
    Member
    Posted 2 years ago #

    EXCELLENT!!!! THANK YOU SO MUCH FOR THE HELP!!!!!!

  8. macart
    Member
    Posted 2 years ago #

    The smaller image can be clicked and it will open the larger image, is there some way to turn this off?

  9. alism
    Member
    Posted 2 years ago #

    Try commenting out the line in mojozoom.js that references the href:

    // linkParent.setAttribute("href", zoomSrc);
  10. macart
    Member
    Posted 2 years ago #

    You have saved my sanity, I have been lost on this one. Thank you very much for the help!!!

  11. alism
    Member
    Posted 2 years ago #

    You're welcome. :-)

  12. macart
    Member
    Posted 2 years ago #

    This broke after 2.9 update. Anyone know why?
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.