Sha256: 456fe62209a4ecb93ac8efb07d3bdb391e2bf6b88770ab7a87918225393a46db

Contents?: true

Size: 968 Bytes

Versions: 44

Compression:

Stored size: 968 Bytes

Contents

function fullListSearch() {
  $('#search input').keyup(function() {
    var value = this.value.toLowerCase();
    if (value == "") {
      $('#full_list li').show();
    }
    else {
      $('#full_list li').each(function() {
        if ($(this).children('a').text().toLowerCase().indexOf(value) == -1) {
          $(this).hide();
        }
        else {
          $(this).show();
        }
      });
    }
    $('#full_list li:even:visible').removeClass('r2').addClass('r1');
    $('#full_list li:odd:visible').removeClass('r1').addClass('r2');
    
    if ($('#full_list li:visible').size() == 0) {
      $('#noresults').fadeIn();
    }
    else {
      $('#noresults').hide();
    }
  });
  
  $('#search input').focus();
  $('#full_list').after("<div id='noresults'>No results were found.</div>")
}

function linkList() {
  $('#full_list li').click(function() {
    window.parent.location = $(this).find('a').attr('href');
  });
}

$(fullListSearch);
$(linkList);

Version data entries

44 entries across 44 versions & 8 rubygems

Version Path
sofa-0.1.4 doc/js/full_list.js
sofa-0.1.3 doc/js/full_list.js
sofa-0.1.2 doc/js/full_list.js
whyvalidationssuckin96-1.6.4 doc/js/full_list.js
whyvalidationssuckin96-1.6.3 doc/js/full_list.js
whyvalidationssuckin96-1.6.2 doc/js/full_list.js
whyvalidationssuckin96-1.6.1 doc/js/full_list.js
whyvalidationssuckin96-1.6.0 doc/js/full_list.js
whyvalidationssuckin96-1.5.5 doc/js/full_list.js
whyvalidationssuckin96-1.5.4 doc/js/full_list.js
whyvalidationssuckin96-1.5.3 doc/js/full_list.js
whyvalidationssuckin96-1.5.2 doc/js/full_list.js
whyvalidationssuckin96-1.5.1 doc/js/full_list.js
whyvalidationssuckin96-1.5.0 doc/js/full_list.js
whyvalidationssuckin96-1.4.0 doc/js/full_list.js
basiszwo-reflection-0.5.1 doc/js/full_list.js
whyvalidationssuckin96-1.3.1 doc/js/full_list.js
whyvalidationssuckin96-1.3.0 doc/js/full_list.js
topsy-0.2.0 doc/js/full_list.js
copyright-0.1.5 doc/js/full_list.js