I have read append php in jquery and it appears that JSON may be the solution but I'm unsure how to combine the 2 blocks of code. Any assistance at all appreciated.
Basically if I have the following JQuery:
$( "li.share-google-plus-1 a span" ).append( '<span class="share-count">x</span>' );
This is tested at http://jsfiddle.net/HSCzf/1/
However in place of 'x' I need to include PHP to fetch the content... something like:
<?php
$obj=new shareCount(get_permalink( $post->ID ));
echo $obj->get_plusones();
?>
Can anyone assist me insert this PHP where the 'x' is?