1/* 06/25/2010 2 PikaChoose 3 Jquery plugin for photo galleries 4 Copyright (C) 2010 Jeremy Fry 5 6 This program is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18*/ 19 20(function (jQuery) { 21 jQuery.fn.PikaChoose = function (user_options) { 22 var defaults = { 23 number_images:0, 24 OIW:700, 25 OIH:600, 26 imgLmar:0, 27 imgTmar:0, 28 image_height: 500, 29 image_width: 600, 30 show_captions: true, 31 auto_play: true, 32 show_prev_next: true, 33 slide_speed: 5000, 34 thumb_width: 50, 35 thumb_height: 50, 36 buttons_text: { play: "Play", stop: "Stop", previous: "", next: "" }, 37 delay_caption: true, 38 user_thumbs: false, 39 transition:[-1], 40 IESafe: false 41 }; 42 43 return jQuery(this).each( 44 function() 45 { 46 function CreateThumbnail() 47 { 48 var image = jQuery(this); 49 var aParent = jQuery(this).parent('a'); 50 if(aParent.length == 0){ aParent = jQuery(this); } 51 aParent.hide(); 52 jQuery(this).attr('pikaLink', aParent.attr('href')); 53 //pull it out of the a tag 54 image = jQuery(this).clone(true).insertAfter(aParent); 55 jQuery(this).removeClass('pika_first'); 56 //wait for load to remove previous or ie will never see the page loaded 57 jQuery(this).bind("load",function(){ aParent.remove(); }); 58 jQuery('<img />').load(function() 59 { 60 var w = image.width(); 61 var h = image.height(); 62 if(w===0){w = image.attr("width");} 63 if(h===0){h = image.attr("height");} 64 //grab a ratio for image to user defined settings 65 var rw = options.thumb_width/w; 66 var rh = options.thumb_height/h; 67 68 //determine which has the smallest ratio (thus needing 69 //to be the side we use to scale so our whole thumb is filled) 70 var ratio; 71 if(rw<rh){ 72 //we'll use ratio later to scale and not distort 73 ratio = rh; 74 var left = ((w*ratio-options.thumb_width)/2)*-1; 75 left = Math.round(left); 76 //set images left offset to match 77 image.css({left:left}); 78 }else{ 79 ratio = rw; 80 var top = 0; 81 image.css({top:top}); 82 } 83 //use those ratios to calculate scale 84 var width = Math.round(w*ratio); 85 var height = Math.round(h*ratio); 86 image.css("position","relative"); 87 image.width(width).height(height); 88 var imgcss={ 89 width: width, 90 height: height 91 }; 92 image.css(imgcss); 93 image.hover( 94 function(){jQuery(this).fadeTo(250,1);}, 95 function(){if(!jQuery(this).hasClass("pika_selected")){jQuery(this).fadeTo(250,0.4);}} 96 ); 97 if(ulist.children('li').find('img:last').index(image)==0){ 98 image.fadeTo(250,1); 99 }else{ 100 image.fadeTo(250,0.4); 101 } 102 jQuery(this).show(); 103 }).attr('src',image.attr('src')); 104 //reset images to the clones 105 106 images = ulist.children('li').find('img:last'); 107 } 108 //bring in options 109 var tranStep = 0; 110 var options = jQuery.extend(defaults, user_options); 111 var ulwidth = options.number_images*(options.thumb_width+10); 112 jQuery(this).css({"width":ulwidth+'px'}); 113 114 115 var cont = jQuery(this); 116 var width = 0; 117 var cpos = parseInt(cont.css("margin-left")); 118 119 //cont.scrollLeft(100000); 120 //width = cont.scrollLeft(); 121 //cont.scrollLeft(cpos); 122 var ismove; 123 124 /* cont.bind('mousedown touchstart',function(e){ 125 if(ulwidth>options.image_width){ 126 127 //var cpos = parseInt(cont.css("margin-left")); 128 129 130 e = e.originalEvent.touches[0]; 131 132 133 var sX = e.pageX; 134 135 cont.bind('mousemove touchmove',function(ev){ 136 137 ev.preventDefault(); 138 ev = ev.originalEvent.touches[0]; 139 140 var left = cpos-(ev.pageX-sX); 141 142 ismove =1; 143 cont.css({"margin-left":-left+'px'}); 144 cpos = parseInt(cont.css("margin-left")); 145 146 sX = ev.pageX; 147 }); 148 149 cont.bind('mouseup touchend',function(ev){ 150 151 cont.unbind('mousemove touchmove mouseup touchend'); 152 153 }); 154 } 155 156 }); 157 158 */ 159 160 161 162 var images = jQuery(this).children('li').find('img'); 163 images.hide(); 164 //save our list for future ref 165 166 var ulist = jQuery(this); 167 ulist.children("li:last").children("img").addClass("pika_last"); 168 images.each(CreateThumbnail); 169 //start building structure 170 var showheight = options.image_height+250; 171 jQuery(this).before("<div class='pika_main' style='width:"+options.image_width+"px; height:"+showheight+"px'></div>"); 172 // houses eveything about the UL 173 var main_div = jQuery(this).prev(".pika_main"); 174 175 //add in slideshow elements when appropriate 176 main_div.append("<div class='pika_play'></div>"); 177 var play_div = jQuery(this).prev(".pika_main").children(".pika_play"); 178 play_div.html("<a class='pika_play_button'>" + options.buttons_text.play + "</a><a class='pika_stop_button'>" + options.buttons_text.stop + "</a>"); 179 //play_div.fadeOut(1);
180 var play_anchor = play_div.children('a:first'); 181 var stop_anchor = play_div.children('a:last'); 182 //this div is used to make image and caption fade together 183 main_div.append("<div class='pika_subdiv' style='width:"+options.image_width+"px; height:"+options.image_height+"px; overflow:hidden;'></div>"); 184 var sub_div = main_div.children(".pika_subdiv"); 185 //the main image we'll be using to load 186 var firstImage = ulist.find("img:first"); 187 if(options.user_thumbs) 188 { 189 firstImage = firstImage.attr('ref'); 190 }else 191 { 192 firstImage = firstImage.attr('src'); 193 } 194 //calculating Image size 195 var newImg = new Image(); 196 newImg.src= firstImage; 197 var nHi = newImg.height; 198 var nWi = newImg.width; 199 if(nHi!=0&& nWi!=0){ 200 calImageSize(nWi,nHi); 201 } 202 else if(firstImage!=null){ 203 204 calImageSize(options.image_width,options.image_height); 205 } 206 207 208 209 sub_div.append("<img class='pika_main_img' src='"+firstImage+"' width='"+options.OIW+"' height='"+options.OIH+"' style='margin-left:"+options.imgLmar+"px; margin-top:"+options.imgTmar+"px' />"); 210 sub_div.append("<div class='pika_animationDivs'>"); 211 var ani_divs = sub_div.find(".pika_animationDivs"); 212 ani_divs.css({'position':'absolute','width':options.image_width+'px','height':options.image_height+'px', 'opacity':0.1}); 213 214 var y = 0; 215 var x = 0; 216 for(var t = 0; t<25;t++) 217 { 218 var a = '<div col="'+y+'" row="'+x+'"></div>'; 219 ani_divs.append(a); 220 y++ 221 if(y == 5) 222 { 223 x++; 224 y=0; 225 } 226 } 227 ani_divs.children(':last').addClass("pikaLastAni"); 228 var main_img = sub_div.children("img"); 229 //build custom overlays. These will use navigation div 230 sub_div.append("<div class='pika_prev_hover'></div><div class='pika_next_hover'></div>"); 231 var prevHover = sub_div.find('.pika_prev_hover'); 232 var nextHover = sub_div.find('.pika_next_hover'); 233 //prevHover.hide(); 234 //nextHover.hide(); 235 //create the caption div when appropriate 236 if(options.show_captions){ 237 main_div.append("<div id='htov'></div><div id='capandprice'><div class='pika_caption'></div><div class='pika_price'></div></div>"); 238 var caption_div = jQuery("#capandprice").children(".pika_caption"); 239 var price_div = jQuery("#capandprice").children(".pika_price"); 240 } 241 242 //navigation div ALWAYS gets created, its refrenced a lot 243 ulist.after("<div class='pika_navigation'></div>"); 244 var navigation_div = jQuery(this).next(".pika_navigation"); 245 //fill in sub elements 246 navigation_div.append("<a class='prev'>" + options.buttons_text.previous + "</a><a class='next'>" + options.buttons_text.next + "</a> <span id='imname'></span><span id='imnum'> </span><span id='thumbns'>Thumbnails</span><span id='speed' onclick='showspeed()'><a class='speed1'>1</a><a class='speed1'>2</a><a class='speed1'>3</a><a class='speed1'>4</a><a class='speed1'>5</a></span><div id='thumbLeft'></div><div id='thumbRight'></div>"); 247 var previous_image_anchor = navigation_div.children('a:first'); 248 var next_image_anchor = navigation_div.children('a:last'); 249 var thumbs = navigation_div.children('#thumbns'); 250 var ST=0; 251 thumbs.bind("click", function(){ 252 if(ST==0){ 253 $("#slideS").css({"display":"inline", 254 "padding-left":"25px", 255 "padding-right":"25px"}); 256 $("#thumbLeft").css({"display":"block"}); 257 $("#thumbRight").css({"display":"block"}); 258 ST=1; 259 } 260 else if(ST==1){ 261 $("#slideS").css({"display":"none"}); 262 $("#thumbLeft").css({"display":"none"}); 263 $("#thumbRight").css({"display":"none"}); 264 cont.css({"margin-left": "0px"}); 265 266 ST=0; 267 } 268 }) 269 //hide the navigation if the user doesn't want it 270 if(!options.show_prev_next){ 271 navigation_div.css("display","none"); 272 } 273 $("#thumbRight").bind("click",function(){ 274 var positionT = parseInt(cont.css("margin-left")); 275 var leftmar = positionT-options.image_width+'px'; 276 var maxscrolL = ulwidth+60; 277 var checkpos = 0-parseInt(leftmar); 278 if(maxscrolL>= checkpos){ 279 cont.animate({"margin-left": leftmar},2000); 280 } 281 }); 282 283 $("#thumbLeft").bind("click",function(){ 284 var positionT = parseInt(cont.css("margin-left")); 285 var leftmar = positionT+options.image_width+'px';
286 var maxscrolR = ulwidth-60; 287 var checkpos = 0-parseInt(leftmar); 288 if(checkpos>=0){ 289 cont.animate({"margin-left": leftmar},2000); 290 } 291 }); 292 //playing triggers the loop for the slideshow 293 var playing = options.auto_play; 294 var animating = false; 295 main_img.wrap("<a></a>"); 296 var main_link = main_img.parent("a"); 297 298 function activate() 299 { 300 //sets the intial phase for everything 301 302 //image_click is controls the fading 303 images.bind("click",image_click); 304 //hiding refrence to slide elements if slide is disabled 305 306 if(options.auto_play){ 307 308 playing = true; 309 play_anchor.show(); 310 stop_anchor.hide(); 311 }else{ 312 play_anchor.hide(); 313 stop_anchor.show(); 314 } 315 316 317 ulist.children("li:last").children("img").addClass("pika_last"); 318 ulist.children("li:first").children("img").addClass("pika_first"); 319 ulist.children("li").each(function(){ jQuery(this).children("span").hide(); }); 320 //css for the list 321 var divcss = { 322 width: options.thumb_width+"px", 323 height: options.thumb_height+"px", 324 "list-style": "none", 325 overflow: "hidden" 326 }; 327 var licss = { 328 "list-style": "none", 329 overflow: "hidden" 330 }; 331 images.each(function(){ 332 jQuery(this).parent('li').css(licss); 333 jQuery(this).wrap(document.createElement("div")); 334 jQuery(this).parent('div').css(divcss); 335 }); 336 //previous link to go back an image 337 previous_image_anchor.bind("click",previous_image); 338 prevHover.bind("click",previous_image); 339 //ditto for forward, also the item that gets auto clicked for slideshow 340 next_image_anchor.bind("click",next_image); 341 nextHover.bind("click",next_image); 342 $("div.cclose_2").bind("click",closeSlideShow); 343 //enable mouse tracking for the hover 344 /* sub_div.mousemove(function(e){ 345 var w = sub_div.width(); 346 var x = e.pageX - sub_div.offset().left; 347 if(x<w*0.3) 348 { 349 prevHover.fadeIn('fast'); 350 }else{ 351 prevHover.fadeOut('fast'); 352 } 353 if(x>w*0.7) 354 { 355 nextHover.fadeIn('fast'); 356 }else{ 357 nextHover.fadeOut('fast'); 358 } 359 }); 360 sub_div.mouseleave(function(){ prevHover.fadeOut('fast');nextHover.fadeOut('fast'); });*/ 361 362 }//end activate function 363 364 function Gapper(ele, aHeight) 365 { 366 if(ele.attr('row') == 9 && ele.attr('col') == 0) 367 { 368 //last row, check the gap and fix it! 369 var gap = ani_divs.height()-(aHeight*9); 370 return gap; 371 } 372 return aHeight; 373 } 374 375 376 function AnimateImage(image_source, image_link,how) 377 { 378 //main_img.hide(); 379 jQuery('<img />').load(function() 380 { 381 ani_divs.height(main_img.height()).show(); 382 ani_divs.children('div').css({'width':'20%','height':'20%','float':'left'}); 383 384 var aWidth = ani_divs.children('div:first').width(); 385 var aHeight = ani_divs.children('div:first').height(); 386 if(how!="autoFirst"){ 387 ani_divs.children().each(function() 388 { 389 //position myself absolutely 390 var div = jQuery(this); 391 var xOffset = Math.floor(div.parent().width()/5)*div.attr('col'); 392 var yOffset = Math.floor(div.parent().height()/5)*div.attr('row'); 393 div.css({ 394 'background':'url('+image_source+') -'+xOffset+'px -'+yOffset+'px', 395 'width':'0px', 396 'height':'0px', 397 'position':'absolute', 398 'top':yOffset+'px', 399 'left':xOffset+'px', 400 'float':'none' 401 }); 402 });//end ani_divs.children.each 403 } 404 405 //decide our transition 406 var n = 0; 407 /*START ___ DELETE THIS COMMENT IF DIFFERENT TYPES OF TRANSACTIONS--------------THIS LINE 408 if(options.transition[0] == -1) 409 { //random 410 n = Math.floor(Math.random()*6); 411 }else{ 412 n = options.transition[tranStep]; 413 tranStep++; 414 if(tranStep >= options.transition.length){tranStep=0;} 415 } 416 if(options.IESafe == true) 417 { 418 if(jQuery.browser.msie) 419 { 420 n = 0; 421 } 422 423 } 424 /*END ___ DELETE THIS COMMENT IF DIFFERENT TYPES OF TRANSACTIONS--------------THIS LINE */ 425 switch(n) 426 { 427 case 0: 428 //full frame fade
429 ani_divs.height(main_img.height()).hide().css({'background':'url('+image_source+') top left no-repeat'}); 430 ani_divs.children('div').hide(); 431 432 FinishedAnimating(image_source,image_link); 433 ani_divs.css({'background':'transparent'}); 434 435 436 break; 437 case 1: 438 ani_divs.children().hide().each(function(index) 439 { 440 //animate out as blocks 441 var delay = index*10; 442 jQuery(this).delay(delay).animate({"width":aWidth,"height":aHeight},800,'linear',function() 443 { 444 if(jQuery(this).hasClass('pikaLastAni')) 445 { 446 FinishedAnimating(image_source,image_link); 447 } 448 }); 449 }); 450 break; 451 case 2: 452 ani_divs.children().hide().each(function(index) 453 { 454 var delay = jQuery(this).attr('row')*10; 455 jQuery(this).css({"width":aWidth}).delay(delay).animate({"height":aHeight},800,'linear',function() 456 { 457 if(jQuery(this).hasClass('pikaLastAni')) 458 { 459 FinishedAnimating(image_source,image_link); 460 } 461 });
462 }); 463 break; 464 case 3: 465 ani_divs.children().hide().each(function(index) 466 { 467 var delay = jQuery(this).attr('col')*10; 468 aHeight = Gapper(jQuery(this), aHeight); 469 jQuery(this).css({"height":aHeight}).delay(delay).animate({"width":aWidth},800,'linear',function() 470 { 471 if(jQuery(this).hasClass('pikaLastAni')) 472 { 473 FinishedAnimating(image_source,image_link); 474 } 475 }); 476 }); 477 break; 478 case 4: 479 ani_divs.children().show().each(function(index) 480 { 481 var delay = index*Math.floor(Math.random()*5)*10; 482 aHeight = Gapper(jQuery(this), aHeight); 483 484 if(jQuery(this).hasClass('pikaLastAni')) 485 { 486 delay = 800; 487 } 488 jQuery(this).css({"height":aHeight,"width":aWidth,"opacity":.01}).delay(delay).animate({"opacity":1},800,function() 489 { 490 if(jQuery(this).hasClass('pikaLastAni')) 491 { 492 FinishedAnimating(image_source,image_link); 493 } 494 });
495 }); 496 break; 497 case 5: 498 //full frame slide 499 ani_divs.height(main_img.height()).hide().css({'background':'url('+image_source+') top left no-repeat'}); 500 ani_divs.children('div').hide(); 501 ani_divs.css({width:0}).animate({width:main_img.width()},'slow',function(){ 502 FinishedAnimating(image_source,image_link); 503 ani_divs.css({'background':'transparent'}); 504 }); 505 506 break; 507 case 6: 508 //fade out then in 509 ani_divs.hide(); 510 main_img.fadeOut('slow',function(){ 511 main_img.attr('src',image_source).fadeIn('slow',function() 512 { 513 FinishedAnimating(image_source,image_link); 514 }); 515 }); 516 517 break; 518 } 519 }).attr('src',image_source);//end image preload 520 }// end animate images 521 522 function FinishedAnimating(image_source,image_link) 523 { 524 var nImage= new Image(); 525 nImage.src=image_source; 526 var iw = nImage.width; 527 var ih = nImage.height; 528 calImageSize(iw,ih); 529 animating = false; 530 main_img.attr("src", image_source); 531 main_img.attr("height",options.OIH); 532 main_img.attr("width",options.OIW); 533 main_img.css({"margin-left":options.imgLmar+"px", 534 "margin-top":options.imgTmar+"px"}); 535 if(image_link == null){image_link = "#"} 536 main_link.attr("href", image_link); 537 ani_divs.children().css({"background":"transparent no-repeat"}); 538 ani_divs.hide(); 539 if(playing) 540 { 541 542 main_img.animate({opacity:1},options.slide_speed, function() 543 { 544 //redudency needed here to catch the user clicking on an image during a change. 545 if(playing){next_image_anchor.trigger("click",["auto"]);} 546 }); 547 } 548 } 549 550 551function calImageSize(imWidth,imHeight){ 552 553 var nw = imWidth; 554 var nh = imHeight; 555 if(nw<=options.image_width&&nh<=options.image_height){ 556 557 options.OIW = nw; 558 options.OIH =nh; 559 options.imgLmar = (options.image_width-nw)/2; 560 options.imgTmar = (options.image_height-nh)/2; 561 562 } 563 else{ 564 565 //grab a ratio for image to user defined settings 566 var dw = options.image_width/nw; 567 var dh = options.image_height/nh; 568 569 //determine which has the smallest ratio (thus needing 570 //to be the side we use to scale so our whole thumb is filled) 571 var dratio; 572 if(dw<dh){ 573 //we'll use ratio later to scale and not distort 574 dratio = dh; 575 576 var dleft = ((dw*dratio-options.image_width)/2)*-1; 577 //options.imgLmar = Math.round(dleft); 578 options.imgLmar = 0; 579 options.imgTmar = 0; 580 //set images left offset to match 581 582 583 }else{ 584 585 dratio = dw; 586 options.imgTmar = 0; 587 options.imgLmar =0; 588 589 } 590 //use those ratios to calculate scale 591 options.OIW = Math.round(nw*dratio); 592 options.OIH = Math.round(nh*dratio); 593 594 } 595 596} 597 598 function image_click(event, how){ 599 //catch when user clicks on an image Then cancel current slideshow 600 if(jQuery(this).hasClass('pika_selected') || animating){ return; } 601 if(how!="auto" && how!="autoFirst"){ 602 animating = true; 603 stop_anchor.hide(); 604 play_anchor.show(); 605 playing=false; 606 607 main_img.stop().dequeue(); 608 if(options.show_captions) 609 { 610 caption_div.stop().dequeue(); 611 price_div.stop().dequeue(); 612 } 613 } 614 //all our image variables 615 var image_source = ""; 616 if(options.user_thumbs) 617 { 618 image_source = jQuery(this).attr("ref"); 619 }else 620 { 621 image_source = this.src; 622 } 623 //thumbnail animations 624 var image_link = jQuery(this).attr("pikalink"); 625 var image_caption = jQuery(this).parent().next("span").html(); 626 var image_price = jQuery(this).parent().next("span").next("div").html(); 627 var image_name = jQuery(this).parent().next("span").next("div").next("div").html(); 628 var image_num = jQuery(this).parent().next("span").next("div").next("div").next("div").html(); 629 $("#imname").html(image_name); 630 $("#imnum").html(image_num); 631 //fade out the old thumb 632 images.filter(".pika_selected").fadeTo(250,0.4); 633 images.filter(".pika_selected").removeClass("pika_selected"); 634 //fade in the new thumb 635 jQuery(this).fadeTo(250,1); 636 jQuery(this).addClass("pika_selected"); 637 //fade the caption out 638 if(options.show_captions) 639 { 640 /* if(options.delay_caption) 641 { 642 //caption_div.fadeTo(800,0); 643 //if(image_price != ""){ 644 //price_div.fadeTo(800,0); 645 } 646 }*/ 647 if(image_caption != "") { 648 caption_div.html(image_caption); 649 caption_div.fadeTo(800,1); 650 } 651 else{
652 caption_div.fadeTo(100,0); 653 } 654 655 if(image_price != ""){ 656 //price_div.fadeTo(5,0,function(){ 657 price_div.html(image_price); 658 price_div.fadeTo(800,1); 659 if(image_caption != ""){ 660 caption_div.css({"width":"50%"}); 661 } 662 //}); 663 } 664 else{ 665 price_div.fadeTo(100,0); 666 if(image_caption != ""){ 667 caption_div.css({"width":"95%"}); 668 } 669 670 671 } 672 } 673 if(how!="autoFirst") 674 { 675 AnimateImage(image_source, image_link, how); 676 } 677 }//end image_click function 678 679 function next_image(event, how){ 680 if(images.filter(".pika_selected").hasClass("pika_last")){ 681 images.filter(":first").trigger("click",how); 682 }else{ 683 images.filter(".pika_selected").parents('li').next('li').find('div img').trigger("click",how); 684 } 685 }//end next image function 686 687 function previous_image(event, how){ 688 if(images.filter(".pika_selected").hasClass("pika_first")){ 689 images.filter(":last").trigger("click",how); 690 }else{ 691 images.filter(".pika_selected").parents('li').prev('li').find('img').trigger("click",how); 692 } 693 }//end previous image function 694function closeSlideShow(){ 695playing = false; 696} 697 function play_button(){ 698 /*main_div.hover( 699 function(){play_div.fadeIn(400);}, 700 function(){play_div.fadeOut(400);} 701 );*/ 702 $('#speed .speed1').bind("click", function(){ 703 var speedvar= $(this).html(); 704 options.slide_speed= 1000*speedvar; 705 }); 706 707 play_anchor.bind("click", function(){ 708 $('#speed').css({"display":"inline"}); 709 main_img.stop(); 710 main_img.dequeue(); 711 if(options.show_captions) 712 { 713 caption_div.stop(); 714 caption_div.dequeue(); 715 price_div.stop(); 716 price_div.dequeue(); 717 } 718 playing = true; 719 next_image_anchor.trigger("click",["auto"]); 720 jQuery(this).hide(); 721 stop_anchor.show(); 722 }); 723 stop_anchor.bind("click", function(){ 724 $('#speed').css({"display":"none"}); 725 playing = false; 726 jQuery(this).hide(); 727 play_anchor.show(); 728 }); 729 } 730 play_button(); 731 activate(); 732 ulist.children('li:first').find('img:last').trigger("click",["autoFirst"]); 733 });//end return this.each 734 }//end build function 735 736 //activate applies the appropriate actions to all the different parts of the structure. 737 //and loads the sets the first image 738})(jQuery); 739 740var showspeedv=0; 741 742 function showspeed(){ 743 if(showspeedv==0){ 744 $("#speed .speed1").css({"display":"inline-block"}); 745 showspeedv=1; 746 } 747 else{ 748 $("#speed .speed1").css({"display":"none"}); 749 showspeedv=0; 750 } 751 752 } 753
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.