I created a custom WordPress page through a plugin where I want to enable / disable comments using this code
<script type="text/javascript"> $("comment_switch").click(function () { $("comments").toggleClass("hidden"); }); </script>
I put it in the <body> . To generate the <head> , I used the standard WordPress function wp_head(); . When I check the source code of the page, I see in the main section <script src="http://10.1.1.6/wp-includes/js/jquery/jquery.js?ver=1.10.2" type="text/javascript"> which I thought would be sufficient to use jQuery.
Can someone help me make jQuery code? The entire source code of the page can be found here.
jquery html wordpress
Radek
source share