Sha256: bf5c918ca16c97eed554f0d313a2f7aabc09ca545dbdbb5fbee389efd24a8cb9

Contents?: true

Size: 636 Bytes

Versions: 12

Compression:

Stored size: 636 Bytes

Contents

(function($) {
  const COMPONENT_SELECTOR = '[data-thredded-currently-online]';

  class ThreddedCurrentlyOnline {
    init($nodes) {
      $($nodes).
        on('mouseenter', function(e) {
          $(this).addClass('thredded--is-expanded');
        }).
        on('mouseleave', function(e) {
          $(this).removeClass('thredded--is-expanded');
        }).
        on('touchstart', function(e) {
          $(this).toggleClass('thredded--is-expanded');
        });
    }
  }

  $(function() {
    var $nodes = $(COMPONENT_SELECTOR);
    if ($nodes.length) {
      new ThreddedCurrentlyOnline().init($nodes);
    }
  });
})(jQuery);

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
thredded-0.7.0 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.6.3 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.6.2 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.6.1 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.6.0 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.5.1 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.5.0 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.4.0 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.3.2 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.3.1 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.3.0 app/assets/javascripts/thredded/components/currently_online.es6
thredded-0.2.2 app/assets/javascripts/thredded/currently_online.es6