user3555483
user3555483

Reputation: 190

JQuery callback handling

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

Answers (1)

sdespont
sdespont

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

Related Questions