• Resolved sharkbait16

    (@sharkbait16)


    Hi there,

    i got CF7 Version 3.0.1 working nicely with WP 3.2.1, see here: http://bit.ly/rXbVP3

    the problem i got now is, that i use jQuery Cycle which uses jQuery 1.6.4 and CF7 injects jQuery 1.6.1 in the header. i would like to use only 1 version of jQuery.

    the odd thing is, that if i deregister jQuery for CF7 in functions.php:

    add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 100 );
    	function deregister_cf7_javascript() {
    	wp_deregister_script( 'contact-form-7' );
    	}

    and call the same jQuery script-reference in header.php, the Ajax validation doesn’t work anymore. it also won’t work with jQuery 1.6.4

    does anyone know how to make CF7 work with jQuery 1.6.4 and/or why does the same call to jQuery (either in header.php or injected by CF7) make or break the Ajax validation?

    thanks a lot, cheers, jan

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    I think you have the wrong idea. WordPress 3.2.1 bundles jQuery 1.6.1 by default and Contact Form 7 does just load it. I don’t know what the jQuery Cycle is, but why not make it to use the default version of jQuery that WordPress bundles?

    Load a default WordPress script from a non-default location

    Thread Starter sharkbait16

    (@sharkbait16)

    Hi Takayuki,

    thanks for answering!

    no, i understand the part, that CF7 uses the jQuery version that is shipped with WP. makes sense 🙂

    unfortunately jQuery Cycle for my galleries & slideshows doesn’t work with jQuery 1.6.1 and CF7 doesn’t work with jQuery 1.6.4 – tricky

    but while i was trying different settings, i found out, that if i use jQuery 1.6.1 instead of it being injected in the header, but ‘hardcode’ it in header.php, Ajax doesn’t work, although the markup is pretty much the same. any ideas? (i try to find out why, because this might be the reason CF7 doesn’t work when i use jQuery 1.6.4)

    thanks for your help!

    cheers, jan

    Thread Starter sharkbait16

    (@sharkbait16)

    *update*

    hey Takayuki,

    okay, now that i load jQuery 1.6.4 instead of the WP 1.6.1 version, replacing it in functions.php like this:

    function my_scripts_method() {
    	wp_deregister_script( 'jquery' );
    	wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
    	wp_enqueue_script( 'jquery' );
    	}
    	add_action('wp_enqueue_scripts', 'my_scripts_method');

    both, Cycle & CF7 work!! weird, why is that?

    thanks, jan

    Thread Starter sharkbait16

    (@sharkbait16)

    oh dear 🙂

    of course it didn’t work!

    if i disable loading scripts:

    add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 100 );
    	function deregister_cf7_javascript() {
    	wp_deregister_script( 'contact-form-7' );
    	}

    it not only didn’t load jQuery, but also the two additional CF7 scripts further down in the markup!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Contact Form 7] jQuery Version & placement’ is closed to new replies.