MacNN Forums (
-   Developer Center (
-   -   jQuery TypeError that makes no sense (

shifuimam May 18, 2013 09:34 PM
jQuery TypeError that makes no sense
I've been tweaking, trying to stylize all the form elements to look more like OS 9. It's been pretty easy so far, but I've run into problems with a jQuery plugin I'm using for styling select (drop-down list) fields.

MediaWiki and Vanilla use an identical skin that I developed. The JS files loaded are different for each though - they're using what's built in, so I'm wondering if that's the problem.

At any rate, this is my error:


TypeError: g.addClass(...).on is not a function

This isn't happening on MediaWiki, as seen in this page: Revision history of "Main Page" - Maclassic

It is, however, happening in Vanilla, as seen here: Sign In - Maclassic Discussion

For those who don't want to register just to see the form, here's what it looks like:

I searched around a bit on the error but can't figure out for the life of me why it's breaking.

This, by the way, is the plugin I'm using for jQuery:

ETA: Ok so it looks like it was a jQuery version issue. I manually upgraded Vanilla to jQ 1.7.2 and it works. Oddly, though, I couldn't upgrade to 1.9 - that broke the forums.
andi*pandi May 19, 2013 12:17 PM
glad you solved it!

jquery versioning can be a problem across plugins.
shifuimam May 20, 2013 08:57 AM
That's annoying but good to know.

You'd think they would at least ensure backwards compatibility. Vanilla officially only supports up to 1.7.2, even though jQuery is up to 2.0. WTF...
boy8cookie May 20, 2013 04:00 PM
.on is a fairly new (and highly useful) jQuery function which is why any plugin using it wont work with a jQuery version prior to 1.7

Most plugins detail what version(s) of jQuery they work with.
All times are GMT -4. The time now is 07:03 AM.

Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

Content Relevant URLs by vBSEO 3.3.2