I am implementing a plugin in my site, I have kept the required php and JS files on my server. But I couldn't figure out how to handle the JQuery callbacks mentioned here - https://github.com/polljoy/PollJoy-web#handle-callbacks-from-plug-in-optional
Kindly demonstrate with an example, how to retrieve the array of results. Your feedback will be appreciated.
<script type="text/javascript">
jQuery(window).load(function() {
polljoy({
endPoint : 'connect.php'
}, function PJPollIsReady(polls){
console.log(polljoy('show'));
});
});
</script>
polljoy-block, does it work? (I can't really set this up at the moment to test). So that thePJPollIsReadyis after the semicolon of thepolljoy-command.