Sha256: da311f285dca1c8f71321940385a9091e264ec8bf7518df0123a959e06c0b313
Contents?: true
Size: 765 Bytes
Versions: 6
Compression:
Stored size: 765 Bytes
Contents
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. $(document).ready(function(){ current_page = 1; var fetching = false $('.translation_keys_listing').live('mousewheel DOMMouseScroll', function(e) { if(e.originalEvent.wheelDelta < 0 && $(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight - 100 && !fetching) { fetching = true; current_page++ $.ajax({ type: 'GET', url: Routes.translation_center_category_more_keys_path(Category.key(), {format: 'js'}), data: { page : current_page }, complete: (function(){ fetching = false }) }); } }) });
Version data entries
6 entries across 6 versions & 1 rubygems