Title: [Plugin: Shadowbox JS] Integrate zoom function help
Last modified: August 20, 2016

---

# [Plugin: Shadowbox JS] Integrate zoom function help

 *  [andregois](https://wordpress.org/support/users/andregois/)
 * (@andregois)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-shadowbox-js-integrate-zoom-function-help/)
 * Hello,
    First of all, congratulations on the great plugin!
 * I’m trying to integrate a zoom feature (like a magnifying glass) into images 
   on the sb img player but I’m having some difficulties.
 * I’m using this script: jacklmoore.com/zoom/
 * The problem is that when I try to initialize the zoom script on the #sb-player
   image I get an error:
    “TypeError: $(“#sb-player”) is null”
 * I assume this happens because shadowbox isn’t loaded yet.
    Is there anyway I 
   can call the zoom function only after the image is loaded? I’ve read about “onChange”
   and “onOpen”, but where can I use these with shadowbox js for wordpress?
 * The function to intialize the zoom is:
    `$('#sb-player').zoom();`
 * Thank you in advance,
    André
 * [http://wordpress.org/extend/plugins/shadowbox-js/](http://wordpress.org/extend/plugins/shadowbox-js/)

The topic ‘[Plugin: Shadowbox JS] Integrate zoom function help’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shadowbox-js.svg)
 * [Shadowbox JS](https://wordpress.org/plugins/shadowbox-js/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shadowbox-js/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shadowbox-js/)
 * [Active Topics](https://wordpress.org/support/plugin/shadowbox-js/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shadowbox-js/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shadowbox-js/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [andregois](https://wordpress.org/support/users/andregois/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-shadowbox-js-integrate-zoom-function-help/)
 * Status: not resolved