Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

jQuery conflict? #16

Closed
srsolano opened this issue Mar 18, 2014 · 8 comments
Closed

jQuery conflict? #16

srsolano opened this issue Mar 18, 2014 · 8 comments

Comments

@srsolano
Copy link

Hi,

After FoundationPress installation my console outputs the typical "Uncaught TypeError: Property '$' of object [object Object] is not a function" error in file js/app.js.

Changing $(document).foundation() to jQuery(document).foundation() at the end fixed it.

Is this normal?

Many thanks!

@ninoCookies
Copy link

I'm getting same error on clean installation. Its when u use any jquery based plugin - actually I yet didn't manage to find a "gallery" plugin that works with this theme.

@jkochis
Copy link

jkochis commented Mar 18, 2014

I've been able to use HG Slider without a problem.

@olefredrik
Copy link
Owner

@srsolano @freeman128 FoundationPress should be 100% compatible with the core functionality in Foundation 5, as the off-canvas menu for mobile, top bar, interchange, orbit slider, clearing lightbox, dropdown buttons, reveal modal ++. All these components depends on jQuery to work, and as you can see here they seem to work just fine right out of the box http://foundationpress.olefredrik.com/kitchen-sink/

Unfortunately, I can not guarantee that every WordPress plugin will work with this theme. FoundationPress uses jQuery v 2.1.0 (as of today). Anyway, you are free to play with it and plug in your own version of jQuery if you want.

@srsolano
Copy link
Author

Sorry but the point is that I have an out of the box installation with no plugins so it isn't a plugin issue and it seems to be the typical conflict with the jQuery included by WP (see this: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers).

I also have seen that when I run the grunt command when installing it hangs on "Running watch task".

Thanks for your support and for your theme!

@olefredrik
Copy link
Owner

@srsolano I don't get this error on my side, but I'll look into it. Regarding grunt, it is actually supposed to hang on the "running watch task". Grunt-watch is included in the 'grunt' default command. When the 'grunt' command is running, grunt watch will monitor any changes in your scss folder. If you make any changes to any file in this folder, grunt will compress and output your changes to the app.css file. I'm afraid the issue you're describing is not a defect, but actually an awesome feature :)

@srsolano
Copy link
Author

LOL I'm new into grunt so didn't know that! Thanks again for your support!

@olefredrik
Copy link
Owner

No worries. Thanks for your feedback!

@carlotrimarchi
Copy link

I'm having the same issue, "$ is not a function", as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants