Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

immyevil on "[Plugin: Contact Form 7] dispaly contact form 7 with jquery"

$
0
0

hello,
i have some problem to add the CF7 with jquery in wordpress custom template.

i want to change a div content when user click in custom menu:

jQuery(".content_box").click(function(){
var temp = jQuery(this).attr("id");
var txt = "";
switch(temp)
	{
		case "fP":
  			txt = "some text";
  		break;
		case "eS":
			txt = '<?php echo do_shortcode('[contact-form-7 id="2134" title="Sans titre"]'); ?>';
		break;
		default:
  			txt = "void";
	}
jQuery("#content_body").html(txt);
});

in the console log of browser i have this alert:
"Uncaught SyntaxError: Unexpected token < "
and this is the link to test:

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


Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>