I have this page:
Here on the homepage, you will find a button called "Get a quote". When you click on this button I want to open link "google.com".
I tried to do this with jQuery using this code but it's not working.
jQuery(document).ready(function($) {
$('.wpcf7-form-control wpcf7-submit').click(function() {
window.location = "www.google.com/index.php?id=";
});
});
This site is made with Wordpress and I used the plugin Contact Form 7
<div class="contact-frm">
<div class="right">
<?php echo do_shortcode('[contact-form-7 id="9" title="get a quote"]'); ?>
</div>
</div>
Can you please help me to solve this problem?
Thanks in advance!
use the below code:
adding
http://
before the link can help you.Also use:
if
wpcf7-submit
is class specify it using dot.
in jQueryif
wpcf7-submit
is id then specify it using dot#
in jQueryInstead of this :
Use this :
It will work for you. There is something you should know:
$
doesn't work in wordpress, For more information see hereYou forgot two things:
http://
in front of the URL.wpcf7-submit
to.wpcf7-submit
.Use this way: