Title: javascript error in ngg.js with tooltip function &#8211; how to fix
Last modified: August 22, 2016

---

# javascript error in ngg.js with tooltip function – how to fix

 *  Resolved [absoblogginlutely](https://wordpress.org/support/users/absoblogginlutely/)
 * (@absoblogginlutely)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-nggjs-with-tooltip-function-how-to-fix/)
 * line 30-34 is throwing a Javascript error which, in turn, is blocking the another(
   simple-modal login’s) plugins Javascript from running:
 * jQuery(document).tooltip({
    content: function () { return jQuery.parseHTML(this.
   getAttribute(“title”)); } });
 * It’s throwing the error because the tooltip function doesn’t exist because the
   plugin does not ensure the Javascript tooltip file with the tooltip function 
   loads.
 * In order to fix this, I went in and made sure the jQuery tooltip widget file 
   is included by going into the nggallery.php file in the main folder, finding 
   where the ngg.js script is enqueued (line 506) and adding a dependency on ‘jquery-
   ui-tooltip’:
 * `wp_enqueue_script ( 'ngg_script', NGGALLERY_URLPATH . 'js/ngg.js', array('jquery'),'
   2.1');`
 * became
 * `wp_enqueue_script ( 'ngg_script', NGGALLERY_URLPATH . 'js/ngg.js', array('jquery','
   jquery-ui-tooltip'), '2.1');`
 * [https://wordpress.org/plugins/nextcellent-gallery-nextgen-legacy/](https://wordpress.org/plugins/nextcellent-gallery-nextgen-legacy/)

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

 *  [niknetniko](https://wordpress.org/support/users/niknetniko/)
 * (@niknetniko)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-nggjs-with-tooltip-function-how-to-fix/#post-5759203)
 * Hi,
 * Thank you for your report! However, we already know about this bug, and a fix
   is going to be released in the next version 🙂
 *  [niknetniko](https://wordpress.org/support/users/niknetniko/)
 * (@niknetniko)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-nggjs-with-tooltip-function-how-to-fix/#post-5759210)
 * And the version is released now. It should be fixed.
 *  Plugin Author [WPReady](https://wordpress.org/support/users/wpready/)
 * (@wpready)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-nggjs-with-tooltip-function-how-to-fix/#post-5759252)
 * Hi there, 1.9.25.2 fix should solve this.
    Thanks to niknetniko which took the
   time to figure it out

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

The topic ‘javascript error in ngg.js with tooltip function – how to fix’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nextcellent-gallery-nextgen-legacy_9c9087.
   svg)
 * [NextCellent Gallery - NextGEN Legacy](https://wordpress.org/plugins/nextcellent-gallery-nextgen-legacy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextcellent-gallery-nextgen-legacy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextcellent-gallery-nextgen-legacy/)
 * [Active Topics](https://wordpress.org/support/plugin/nextcellent-gallery-nextgen-legacy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextcellent-gallery-nextgen-legacy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextcellent-gallery-nextgen-legacy/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [WPReady](https://wordpress.org/support/users/wpready/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-nggjs-with-tooltip-function-how-to-fix/#post-5759252)
 * Status: resolved