BadrIT/translation_center

View on GitHub
app/assets/javascripts/translation_center/categories.js

Summary

Maintainability
A
0 mins
Test Coverage
// 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(){

  // when filter changes
  $('.keys_filter').click(function(){
    $('#current_filter').val($(this).attr('id'));
    $.ajax({
      url: Routes.translation_center_category_path + Category.key() + '.js',
      data: { filter: Filter.key() }
    });
    $($('.keys_filter').parent()).removeClass('active');
    $($(this).parent()).addClass('active');
  });


});