Sha256: 451e06b500c475bc9bb4cfdeb58229f65ee09611c1164eebbff37be3da7c23bb
Contents?: true
Size: 589 Bytes
Versions: 19
Compression:
Stored size: 589 Bytes
Contents
class App.Views.DropdownMenu extends Backbone.View el: 'body' events: 'click .dropdown-trigger': 'showDropdown' initialize: -> $(document).click(@checkHideDropdown) showDropdown: (e) -> e.preventDefault() $(e.target).closest('.dropdown-container').find('.dropdown-menu') .toggleClass('active') true checkHideDropdown: (e) -> if( !$(e.target).is('.dropdown-menu') && !$(e.target).is('.dropdown-container') && $(e.target).parents('.dropdown-container').length == 0 ) $('.dropdown-menu').removeClass('active') true
Version data entries
19 entries across 19 versions & 1 rubygems