Title: Uncaught TypeError: undefined is not a function
Last modified: August 21, 2016

---

# Uncaught TypeError: undefined is not a function

 *  Resolved [Daniele](https://wordpress.org/support/users/dabesa/)
 * (@dabesa)
 * [12 years ago](https://wordpress.org/support/topic/uncaught-typeerror-undefined-is-not-a-function/)
 * Hi there,
    Thanks for the theme, it’s perfect for a project I’m working on. I
   did notice a bug, the general.js script is giving error in all pages:
 * Uncaught TypeError: undefined is not a function
 * “TypeError: $(…).niceScroll is not a function
    …cursoropacitymax:0.7,cursorwidth:
   11,cursorborder:”1px solid #2848BE”,cursorborde…”
 * This is caused by those two lines in general.js:
 * $(“#suggestionslist”).niceScroll({touchbehavior:true,cursorcolor:”#048EB0″,cursoropacitymax:
   0.7,cursorwidth:11,cursorborder:”1px solid #2848BE”,cursorborderradius:”8px”,
   background:”#ccc”,autohidemode:false}); // MAC like scrollbar
 * $(“#suggestionslist2″).niceScroll({touchbehavior:false,cursorcolor:”#00F”,cursoropacitymax:
   0.7,cursorwidth:6,background:”#ccc”,autohidemode:false});
 * The error was preventing other js code to be executed.
    I commented those lines
   and now is OK, but I think there’s a bug.
 * Can you check?

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

 *  Theme Author [FasterThemes](https://wordpress.org/support/users/fasterthemes/)
 * (@fasterthemes)
 * [12 years ago](https://wordpress.org/support/topic/uncaught-typeerror-undefined-is-not-a-function/#post-4904646)
 * Hi Mate.
    Thanks for pointing this out. ‘ll check and get this fixed in the future
   release.
 *  [msphpwd](https://wordpress.org/support/users/msphpwd/)
 * (@msphpwd)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/uncaught-typeerror-undefined-is-not-a-function/#post-4904715)
 * when i enter onclick event as custom cosde. onclick automatically remove.
    how
   can i solve that

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

The topic ‘Uncaught TypeError: undefined is not a function’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mywiki/5.0.1/screenshot.png)
 * MyWiki
 * [Support Threads](https://wordpress.org/support/theme/mywiki/)
 * [Active Topics](https://wordpress.org/support/theme/mywiki/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mywiki/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mywiki/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [msphpwd](https://wordpress.org/support/users/msphpwd/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/uncaught-typeerror-undefined-is-not-a-function/#post-4904715)
 * Status: resolved