We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Zeta Poll Image Sizer
Topic Started: Apr 10 2012, 03:04 PM (470 Views)
paradise.engineering
Member Avatar
Lowpoly Workshop Founder
[ *  *  * ]
Ever got annoyed by the way zeta handles big pictures in polls? :doh: :stunned:

Code: Bellow the Board
 

<script type="text/javascript">
//<![CDATA[
window.onload=(function() {
$("td.c_poll-choice img[alt='Poll Image'], td.c_poll-answer img[alt='Poll Image']").each(function() {
if (this.width >= 500) {
$(this).wrap("<a href='" + this.src + "'></a>");
$(this).after("<br /><small><a href='" + this.src + "' class='view_full'>View Full Image</a></small>");
}
});
});
//]]></script>


Code: css
 
.c_poll-choice img {max-width:640px}
.c_poll-answer img {max-width:640px}


max-width:640px -> change 640 to any value you wish
Edited by paradise.engineering, Apr 11 2012, 12:27 AM.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
In regards to both of your codes, you don't have to rewrite the entire script to make it affect different elements, just use the following instead:
Code:
 
td.c_poll-choice img[alt='Poll Image'], td.c_poll-answer img[alt='Poll Image']
Online Profile Quote Post Goto Top
 
paradise.engineering
Member Avatar
Lowpoly Workshop Founder
[ *  *  * ]
haha thank you very much Cory!
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply