[Plugin: Contact Form 7] contact form 7 and custom js jquery file conflict
-
Hi, CF7 does not work properly with my custom jquery file in my js folder – the generator tag vanishes etc.
My custom jquery file is wrapped:
EITHER:
jQuery(document).ready(function($) {
//code
});
OR:
var $ = jQuery.noConflict();
$(document).ready(function() {
//code
});Neither works – and I’ve tried different variable characters.
I set up my custom js in my wordpress functions.php:
<?php
function add_my_scripts(){
wp_register_script(‘jquerycustom’,
get_bloginfo(‘stylesheet_directory’).’/js/jquerycustom.js’,
array(‘jquery’),’1.0′);
wp_enqueue_script(‘jquerycustom’);
}
add_action(‘init’, ‘add_my_scripts’);
?>
…which I presume is ok – it works fine for my jquery.Any help appreciated!
- The topic ‘[Plugin: Contact Form 7] contact form 7 and custom js jquery file conflict’ is closed to new replies.