CF7 and require.js
-
Hi,
I am using version 4.5.1 and I already have include require js in my theme in my functions.php by:
function custom_jquery() { if (!is_admin()) { wp_enqueue_script( 'requirejs', get_stylesheet_directory_uri(). '/js/require.min.js', array( 'jquery', 'jquery-migrate' ) ); wp_enqueue_script('jquery'); wp_enqueue_script('jquery-migrate'); } } add_action('init', 'custom_jquery');Now I’m getting 2 errors:
scripts.js:14 Uncaught TypeError: this.ajaxForm is not a function(…)$.fn.wpcf7InitForm @...andscripts.js:14(anonymous function) @ scripts.js:459i @ jquery.js:2fireWith @ jquery.js:2ready @ jquery.js:2K @ jquery.js:2 require.min.js:5 Uncaught Error: Mismatched anonymous define()...HTML:
1. jquery
2. js-migrate
3. require-js
4. form.min (cf7)
5. scripts.js (cf7)Is there a way to use require.js in wordpress AND the plugin cf7?
greetz
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘CF7 and require.js’ is closed to new replies.