Reputation: 190
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 - http://goo.gl/I6CFPZ
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>
Upvotes: 0
Views: 60
Reputation: 14025
Sample for PJPollDidShow
event
jQuery(window).load(function() {
polljoy({
endPoint : 'connect.php',
PJPollDidShow: function(poll){
//Here is the callback for the PJPollDidShow event
}
});
});
Upvotes: 1