Team:Tsinghua/header
From 2011.igem.org
(Difference between revisions)
GuoQiangChen (Talk | contribs) |
GuoQiangChen (Talk | contribs) |
||
Line 38: | Line 38: | ||
var dpad = 0; | var dpad = 0; | ||
- | + | dpad = Math.round($(this).attr("offsetWidth")/10); | |
- | + | if(isNaN(dpad)) | |
- | + | { | |
+ | dpad = Math.round($(this)[0].offsetWidth / 10); | ||
+ | } | ||
dpad = 25 - dpad; | dpad = 25 - dpad; | ||
dpad += "px"; | dpad += "px"; |
Revision as of 14:50, 17 August 2011