|
|
Line 194: |
Line 194: |
| //img is $(<img>), local is local path, igem is igem server's path | | //img is $(<img>), local is local path, igem is igem server's path |
| var load_img = function (img, local, server) { | | var load_img = function (img, local, server) { |
− | var image = new Image(); | + | img.each(function (index, value) { |
− | image.onload = function () { img.attr('src', image.src); };
| + | var image = new Image(); |
− | if(igem)
| + | image.onload = function () { $(value).attr('src', image.src); }; |
− | image.src = server;
| + | if (igem) |
− | else
| + | image.src = server; |
− | image.src = local;
| + | else |
| + | image.src = local; |
| + | }) |
| } | | } |
| //the parameters are all jqueries | | //the parameters are all jqueries |
Line 215: |
Line 217: |
| auto_adjust_parent($('.auto-adjust')) | | auto_adjust_parent($('.auto-adjust')) |
| | | |
− | load_img($('#group-gallery img:first-child'), 'image/whole-group-1366.jpg', 'https://static.igem.org/mediawiki/2016/4/4b/T--NKU_China--whole-group-1366.jpg') | + | load_img($('img[src="whole-group-1366.jpg"]'), 'image/whole-group-1366.jpg', 'https://static.igem.org/mediawiki/2016/4/4b/T--NKU_China--whole-group-1366.jpg') |
| + | load_img($('img[src="chenlingyi.jpg"]'), 'image/chenlingyi.jpg', 'https://static.igem.org/mediawiki/2016/4/49/T--NKU_China--Chenlingyi.jpg') |
| + | load_img($('img[src="songcunjiang.jpg"]'), 'image/songcunjiang.jpg', 'https://static.igem.org/mediawiki/2016/a/a6/T--NKU_China--songcunjiang.jpg') |
| + | load_img($('img[src="liuxiao.jpg"]'), 'image/liuxiao.jpg', 'https://static.igem.org/mediawiki/2016/5/53/T--NKU_China--liuxiao.jpg') |
| + | load_img($('img[src="songxinghao.jpg"]'), 'image/songxinghao.jpg', 'https://static.igem.org/mediawiki/2016/f/f2/T--NKU_China--songxinghao.jpg') |
| + | |
| + | load_img($('img[src=""]'), 'image/', '') |
| + | load_img($('img[src=""]'), 'image/', '') |
| + | |
| | | |
| //#tab-wrapper | | //#tab-wrapper |
Line 222: |
Line 232: |
| tab_tab_li.click(function () { switcher(tab_tab_li, [tab_ul], $(this)); }); | | tab_tab_li.click(function () { switcher(tab_tab_li, [tab_ul], $(this)); }); |
| | | |
| + | //to do: use regexp to refresh img.compress |
| //after the entire page is ready, silently refresh high resolution images | | //after the entire page is ready, silently refresh high resolution images |
− | load_img($('#group-gallery img:first-child'), 'image/whole-group.jpg', 'https://static.igem.org/mediawiki/2016/3/39/T--NKU_China--whole-group.jpg') | + | //load_img($('#group-gallery img:first-child'), 'image/whole-group.jpg', 'https://static.igem.org/mediawiki/2016/3/39/T--NKU_China--whole-group.jpg') |
| | | |
| }) | | }) |
Line 248: |
Line 259: |
| </article> | | </article> |
| <div id="group-gallery"> | | <div id="group-gallery"> |
− | <img src="whole-group-1366.jpg" width="1366" height="770" class="auto-adjust"/> | + | <img src="whole-group-1366.jpg" width="1366" height="770" class="auto-adjust compress"/> |
| </div> | | </div> |
| <nav id="tab-wrapper"> | | <nav id="tab-wrapper"> |
Line 295: |
Line 306: |
| </div> | | </div> |
| </nav> | | </nav> |
− | <div id="personal-gallery">
| + | <div id="personal-gallery"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="image/songcunjiang.jpg">
| + | <img src="songcunjiang.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/5/53/T--NKU_China--liuxiao.jpg">
| + | <img src="liuxiao.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/5/57/T--NKU_China--XINGHAO.jpg">
| + | <img src="songxinghao.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/2/29/T--NKU_China--zhangzhaoran.jpg">
| + | <img src="https://static.igem.org/mediawiki/2016/2/29/T--NKU_China--zhangzhaoran.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/5/5f/T--NKU_China--maxinyv.jpg">
| + | <img src="https://static.igem.org/mediawiki/2016/5/5f/T--NKU_China--maxinyv.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/0/05/T--NKU_China--zhangmengxian.jpg">
| + | <img src="https://static.igem.org/mediawiki/2016/0/05/T--NKU_China--zhangmengxian.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/c/cd/T--NKU_China--chenchen-768.jpg">
| + | <img src="https://static.igem.org/mediawiki/2016/c/cd/T--NKU_China--chenchen-768.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/a/ab/T--NKU_China--xiongyuxiu.jpg">
| + | <img src="https://static.igem.org/mediawiki/2016/a/ab/T--NKU_China--xiongyuxiu.jpg" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/4/42/T--NKU_China--dongzhuoer-768.png">
| + | <img src="https://static.igem.org/mediawiki/2016/4/42/T--NKU_China--dongzhuoer-768.png" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/d/df/T--NKU_China--dailiangti-768.png">
| + | <img src="https://static.igem.org/mediawiki/2016/d/df/T--NKU_China--dailiangti-768.png" width="683" height="512"> |
− | <img src="https://static.igem.org/mediawiki/2016/d/db/T--NKU_China--zhaoxianglin.jpg">
| + | <img src="https://static.igem.org/mediawiki/2016/d/db/T--NKU_China--zhaoxianglin.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
− | <img src="image/chenlingyi.jpg">
| + | <img src="chenlingyi.jpg" width="683" height="512"> |
| | | |
− | </div>
| + | </div> |
| <div id="personal-description"> | | <div id="personal-description"> |
| <article> | | <article> |