mardi 12 avril 2016

WordPress with RequireJS causing troubles when using WP plugin Visual Composer

This is the context:

  • We are developing a custom theme using WP + RequireJS.
  • We are also using Visual Composer, which is a WP plugin which allows a user advanced editing options.
  • Visual Composer depends on jQuery Waypoints (v2.0.2).

We get this error when using RequireJS with Visual Composer & jQuery Waypoints:

Uncaught TypeError: $.waypoints is not a function

This error occurs because Waypoints detects RequireJS and extends its jQuery instance instead of the global WP jQuery instance which Visual Composer uses.

How can we get around this error?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire