1$.fn.start = function(rating,cb) { 2 var length = $(this).children().length; 3 var children = $(this).children(); 4 //current index ,0 base 5 var current = -1; 6 7 8 if(typeof(rating) === 'function'){ 9 cb = rating; 10 }else{ 11 if(rating <1 || rating > length){ 12 rating = -1; 13 } 14 } 15 //init rating 16 current = rating - 1; 17 for (var j = 0; j <= current; j++) { 18 $(children[j]).removeClass('jr-nomal jr-rating').addClass('jr-rating'); 19 } 20 for (var i = 0; i < length; i++) { 21 22 $(children[i]).bind('mouseover', function(event) { 23 current = $(this).index(children[i]); 24 25 for (var j = 0; j <= current; j++) { 26 $(children[j]).removeClass('jr-nomal jr-rating').addClass('jr-rating'); 27 } 28 for (var j = current + 1; j < length; j++) { 29 $(children[j]).removeClass('jr-nomal jr-rating').addClass('jr-nomal'); 30 } 31 32 if (typeof(cb) === 'function') { 33 34 cb(current + 1); 35 } 36 }); 37 } 38} 39 40$.fn.getCurrentRating = function(){ 41 var length = $(this).children().length; 42 var children = $(this).children(); 43 var resulut = 0; 44 45 for (var i = 0; i < length; i++) { 46 if($(children[i]).hasClass('jr-rating')){ 47 resulut +=1; 48 }else{ 49 break; 50 } 51 } 52 return resulut; 53}
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.