PHP Classes

File: js/nbg-currency-settings.js

Recommend this page to a friend!
  Classes of Temuri Takalandze  >  Drupal NBG Currency  >  js/nbg-currency-settings.js  >  Download  
File: js/nbg-currency-settings.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Drupal NBG Currency
Drupal module to show currency values with NBG API
Author: By
Last change:
Date: 1 year ago
Size: 581 bytes
 

Contents

Class file image Download
/**
 * @file
 * NBG Currency block behaviors.
 */
(function ($, Drupal) {
  'use strict';

  Drupal.behaviors.ngbCurrencyFilterByText = {
    attach: function (context, settings) {
      // Currency filter.
      $('input.currency-filter-search', context).once().on('input', function (e) {
        var value = $(this).val().toLowerCase();
        $('.nbg-currency')
            .closest('.form-type-checkbox')
            .filter(function () {
              $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);
            });
      });
    }
  };
})(jQuery, Drupal);
For more information send a message to info at phpclasses dot org.