´ý¸Ä½ø²¿·Ö
1.´óͼ¿É¸ù¾Ýä¯ÀÀÆ÷·Ö±æÂÊ×Ô¶¯Ëõ·Å£¬Ä¿Ç°ÊÇ°´Õչ̶¨µÄ¿íºÍ¸ßÏÔʾ£¬³¬³ö²¿·ÖÒþ²Ø¡£
2.´óͼÏÖÔÚÊÇÖ±½ÓÔØÈëÁËËùÓУ¬ÈôͼƬºÜ¶àʱ£¬ÌåÑé²»ºÃ¡£¿É¸ÄΪÒì²½¼ÓÔØ£¬»òÕßÑÓ³Ù¼ÓÔØ£¬Õâ¸ö¿ÉÒÔÓÃjquery¿Ø¼þlazyloadʵÏÖ¡£
3.ËõÂÔͼÊǸù¾ÝÉÏ´«Ê±É趨µÄ²ÎÊýÖ±½ÓÉú³ÉµÄ£¬Èç¹ûÊÇÊúÐÎͼƬ£¬»á³öÏÖ±»Ñ¹ËõµÄÇé¿ö¡£¿ÉÒÔ¸ÄΪֻÏÔʾ¾Ö²¿£¬³¬³ö²¿·ÖÒþ²Ø¡£
4.ËõÂÔͼÁбíµÄ»¬¶¯²ÉÓÃÁËjcarousellite²å¼þ£¬Èç¹û½«»ÃµÆƬÌáȡΪ²å¼þµÄ»°£¬ÐèÒªÕûºÏΪһ¸ö¡£
5.Ä¿Ç°´óͼÇøÓòºÍËõÂÔͼÇøÓòÊÇÏà¶Ô¶ÀÁ¢µÄ£¬ÓŵãÊDZȽÏÖ±¹Û£¬¿ÉÒÔ×ÔÐÐËæ±ã¸ü¸ÄÏÔʾλÖã¬È±µãÊÇHTMLµÄ´úÂëÁ¿½Ï¶à£¬²»ÏñÓÐЩ²å¼þ£¬Ö»ÐèÒª$("#ID")һϾͿÉÒÔÁË¡£
var currentImage; var currentIndex = -1; //ÏÔʾ´óͼ(²ÎÊýindex´Ó0¿ªÊ¼¼ÆÊý) function showImage(index) { //¸üе±Ç°Í¼Æ¬Ò³Âë $(".CounterCurrent").html(index + 1); //Òþ²Ø»òÏÔʾÏò×óÏòÓÒÊó±êÊÖÊÆ var len = $('#OriginalPic img').length; if (index == len - 1) { $("#aNext").hide(); } else { $("#aNext").show(); } if (index == 0) { $("#aPrev").hide(); } else { $("#aPrev").show(); } //ÏÔʾ´óͼ if (index < $('#OriginalPic img').length) { var indexImage = $('#OriginalPic p')[index]; //Òþ²Øµ±Ç°µÄͼ if (currentImage) { if (currentImage != indexImage) { $(currentImage).css('z-index', 2); $(currentImage).fadeOut(0, function () { $(this).css({ 'display': 'none', 'z-index': 1 }) }); } } //ÏÔʾÓû§Ñ¡ÔñµÄͼ $(indexImage).show().css({ 'opacity': 0.4 }); $(indexImage).animate({ opacity: 1 }, { duration: 200 }); //¸üбäÁ¿ currentImage = indexImage; currentIndex = index; //ÒƳý²¢Ìí¼Ó¸ßÁÁ $('#ThumbPic img').removeClass('active'); $($('#ThumbPic img')[index]).addClass('active'); //ÉèÖÃÏò×óÏòÓÒÊó±êÊÖÊÆÇøÓòµÄ¸ß¶È //var tempHeight = $($('#OriginalPic img')[index]).height(); //$('#aPrev').height(tempHeight); //$('#aNext').height(tempHeight); } } //ÏÂÒ»ÕÅ function ShowNext() { var len = $('#OriginalPic img').length; var next = currentIndex < (len - 1) ? currentIndex + 1 : 0; showImage(next); } //ÉÏÒ»ÕÅ function ShowPrep() { var len = $('#OriginalPic img').length; var next = currentIndex == 0 ? (len - 1) : currentIndex - 1; showImage(next); } //ÏÂÒ»ÕÅʼþ $("#aNext").click(function () { ShowNext(); if ($(".active").position().left >= 144 * 5) { $("#btnNext").click(); } }); //ÉÏÒ»ÕÅʼþ $("#aPrev").click(function () { ShowPrep(); if ($(".active").position().left <= 144 * 5) { $("#btnPrev").click(); } }); //³õʼ»¯Ê¼þ $(".OriginalPicBorder").ready(function () { ShowNext(); //°ó¶¨ËõÂÔͼµã»÷ʼþ $('#ThumbPic li').bind('click', function (e) { var count = $(this).attr('rel'); showImage(parseInt(count) - 1); }); });ÍêÕû´úÂëÏÂÔØ
ÍƼöÐÅÏ¢
- jqueryʵÏÖÍøվͼƬÀÁ¼ÓÔØ´úÂë
- jQuery Tooltips²å¼þ
- jQueryµÄ.bind()¡¢.live()ºÍ.delegate(....
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- Ä㲻ϲ»¶»ðºü£¬µ«ÓÖϲ»¶firebug£¬ÄǾ͸úÎÒÒ»ÆðÀ´ÔÚIEÉÏ....
- ¸ù¾ÝÏÔʾÆ÷·Ö±æÂʵ÷ÕûÒ³ÃæÏÔʾµÄJavascript½Å±¾
- jQuery дµÄ·ÂÐÂÀË΢²© ÏòϹö¶¯Ð§¹û¡¾×ªÔØ¡¿
- ͨÓõÄJqueryÑ¡ÔñÆ÷
- jQuery ½áºÏ Json Ìá½»Êý¾Ýµ½Webservice£¬....
- ×ÔÖÆjQueryÖÇÄÜÌáʾ²å¼þһö
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- js»ñÈ¡srcÖд«µÝµÄ²ÎÊý
- jqueryʵÏÖÍøվͼƬÀÁ¼ÓÔØ´úÂë
- ÈÃä¯ÀÀÆ÷ÆÁ±ÎµôJavaScriptµÄ³ö´íÌáʾ
- github²»ÄܼÓÔØcss¡¢js½â¾ö°ì·¨
- ÎÒÖªµÀµÄJavaScript -- Éè¼Æģʽ(ÇŽÓ)Ó¦ÓÃÖ® ¨C ....
- 15¸öÖµµÃ¿ª·¢ÈËÔ±¹Ø×¢µÄjQuery¿ª·¢¼¼ÇɺÍÐĵÃ
- dz̸JavascriptÃæÏò¶ÔÏó±à³Ì
- JS¼òµ¥¶¯»·â×°
- JavaScript³õѧÕßӦעÒâµÄÆ߸öϸ½Ú
- jQuery Tooltips²å¼þ
ÆÀÂÛ