I am trying to understand how this should work.
Should I include this in the page.php of my theme? Or actually in a separate theme for the frontend submission page to avoid that it is show on each and every page?
I included it in page.ph, but just the text "var total = 0; $( '.like input:checked' ).each( function() { total += $(this).val(); } ); // Output total somewhere $( '#selector' ).text( total );" is shown on each and every page.
I am obviously doing something wrong.