CPoll.redraw BEFROE ============================================================================ //-- voted if ( tpl["indicate-voted"] && px.sels ) { if ( "b1" in px.sels ) { jqo_btns.addClass("aiin-sel"); } else { jqo_btns.removeClass("aiin-sel"); } } ============================================================================ AFTER ============================================================================ //-- voted if ( px.sels ) { if ( "b1" in px.sels ) { jqo_btns.attr("data-sel","1"); } else { jqo_btns.attr("data-sel","0"); } if ( tpl["indicate-voted"] ) { if ( "b1" in px.sels ) { jqo_btns.addClass("aiin-sel"); } else { jqo_btns.removeClass("aiin-sel"); } } } ============================================================================ AFTER2 : include the case of "tpl["indicate-voted"] == 2" ============================================================================ //-- voted var b_sel = (( px.sels ) && ( "b1" in px.sels )); if ( b_sel ) { jqo_btns.attr("data-sel","1"); } else { jqo_btns.attr("data-sel","0"); } if ( tpl["indicate-voted"] ) { if ( b_sel || ( tpl["indicate-voted"] == 2 )) { jqo_btns.addClass("aiin-sel"); } else { jqo_btns.removeClass("aiin-sel"); } }