Title: Problem with javascript
Last modified: October 2, 2016

---

# Problem with javascript

 *  Resolved [gabrus](https://wordpress.org/support/users/gabrus/)
 * (@gabrus)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/)
 * Hi guys!
    I was trying to use the lightbox with the foo gallery, but i have some
   problem with the code! I have already put the gallery in my page but when i click
   on a casual image, i don’t get the lightbox! I get this error in my console: 
   TypeError: $(…).foobox is not a function $(“.foogallery-container.foogallery-
   lightbox-foobox, .foogallery-container.fooga…
 * What I should do?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [bradvin](https://wordpress.org/support/users/bradvin/)
 * (@bradvin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/#post-8244631)
 * Hey
 * Can you link to your page?
 * I have seen this error before when the scripts are loaded via async, which could
   be your problem.
 *  Thread Starter [gabrus](https://wordpress.org/support/users/gabrus/)
 * (@gabrus)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/#post-8244748)
 * Here’s the link:
    [http://www.freshanimazione.it/bambini/+](http://www.freshanimazione.it/bambini/+)
   Thank’s for the help!
 * EDIT:
    Click on “Mascotte” to see the gallery!
    -  This reply was modified 9 years, 8 months ago by [gabrus](https://wordpress.org/support/users/gabrus/).
 *  Plugin Author [bradvin](https://wordpress.org/support/users/bradvin/)
 * (@bradvin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/#post-8248482)
 * thanks – I had a look at your page, and the reason for the error is your theme
   is including it’s own version of jquery (which is bad practice). It should be
   including the jQuery that is bundled in WP.
 * If you can remove the code that includes the duplicate jquery then it should 
   work
 *  Plugin Author [bradvin](https://wordpress.org/support/users/bradvin/)
 * (@bradvin)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/#post-8251742)
 * We have figured out a workaround for this scenario. It is included in the 1.1.9
   release which is now available. Please upgrade and your problems will be fixed
 *  Thread Starter [gabrus](https://wordpress.org/support/users/gabrus/)
 * (@gabrus)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/#post-8251823)
 * Perfect! Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Problem with javascript’ is closed to new replies.

 * ![](https://ps.w.org/foobox-image-lightbox/assets/icon-256x256.gif?rev=2667030)
 * [Lightbox & Modal Popup WordPress Plugin - FooBox](https://wordpress.org/plugins/foobox-image-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foobox-image-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foobox-image-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/foobox-image-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foobox-image-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foobox-image-lightbox/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [gabrus](https://wordpress.org/support/users/gabrus/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/problem-with-javascript/#post-8251823)
 * Status: resolved