1'use strict'; 2 3$(function () { 4 5 function selectPickup () { 6 7 // pickupãä¸ä»¶ããªãå ´åãpickupã¨ãªã¢é表示 8 if(!$('#pickup .genre-pickup').length) { 9 return; 10 } 11 12 var pickupArray = []; // ã©ã³ãã 表示ç¨é å 13 var displayPickupIndex = 1; // 表示ãããpickupã®indes 14 15 $('#pickup .genre-pickup').each(function(index, element){ 16 var rate = $(this).data('rate') || 1; // data-rateããªããã°ã1ã 17 for(var i = 0; i < rate; i++) { 18 pickupArray.push(index); 19 } 20 }); 21 22 var randomIndex = pickupArray[ Math.floor(Math.random() * pickupArray.length) ]; 23 24 // 表示 25 $('#pickup').show(); 26 $('#pickup .genre-pickup').hide(); 27 $('#pickup .genre-pickup').eq(randomIndex).show(); 28 29 } 30 31 32 function init () { 33 34 $('#pickup-main').load('./parts/pickup.html .genre-pickup', function(){ 35 selectPickup(); 36 }); 37 } 38 39 init(); 40});
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.