Plugin Author
YOP
(@yourownprogrammer)
Hello
Edit the poll template you are using (YOP Poll->Templates) and on JavaScript section replace these 2 functions
function equalWidth_%POLL-ID%(...){..} and function equalWidth2_%POLL-ID%(...){...}
with the ones below
function equalWidth_%POLL-ID%(obj, cols, findWidest ) {
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
if ( findWidest ) {
obj.each(function() {
var thisWidth = jQuery(this).width();
width = parseInt(thisWidth / cols);
jQuery(this).width(width);
jQuery(this).css("float", "left");
});
}
else {
var widest = 0;
obj.each(function() {
var thisWidth = jQuery(this).width();
if(thisWidth > widest) {
widest = thisWidth;
}
});
width = parseInt( jQuery('#yop-poll-container-%POLL-ID%') / cols[0]);
obj.width(width-20);
obj.css("float", "left");
}
}
function equalWidth2_%POLL-ID%(obj, cols, findWidest ) {
findWidest = typeof findWidest !== "undefined" ? findWidest : false;
if ( findWidest ) {
obj.each(function() {
var thisWidth = jQuery(this).width();
width = parseInt(thisWidth / cols);
jQuery(this).width(width);
jQuery(this).css("float", "left");
});
}
else {
var widest = 0;
obj.each(function() {
var thisWidth = jQuery(this).width();
if(thisWidth > widest) {
widest = thisWidth;
}
});
width = parseInt( jQuery('#yop-poll-container-%POLL-ID%') / cols[1]);
obj.width(width-20);
obj.css("float", "left");
}
}
Let us know if this fixes your issue.
Best
YOP Team
I need the same feature. I tried this with no success…
Thnkas for your help.