Support » Plugin: YOP Poll » Possible to record votes w/o a vote button?

  • Resolved Runtheball

    (@eisenbart)


    Is there a way to record votes without any vote button displaying? In other words, if our poll has one question with 3 answers, can we have a click on any of those answers register the vote?

    Just want to know if its possible, and if so, perhaps a hint as to how to make it happen?

    http://wordpress.org/extend/plugins/yop-poll/

Viewing 1 replies (of 1 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hi Runtheball,

    You can do that, just follow the instructions below:

    – from the main menu, go to “Templates” and edit the one you used for your poll;

    – in Template Before Vote section, replace

    <div>%POLL-VOTE-BUTTON%</div>

    with

    <div id="yop_poll_vote-button-%POLL-ID%"></div>

    – in the JavaScript section, after jQuery(document).ready(function(e) {
    add

    jQuery(".yop-poll-li-answer-%POLL-ID% :radio").click(function() {
        if (jQuery(this).attr('checked')) {
            yop_poll_do_vote('%POLL-ID%');
       }
    });

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Regards,

    YOP Team

Viewing 1 replies (of 1 total)
  • The topic ‘Possible to record votes w/o a vote button?’ is closed to new replies.