How can I add jQuery to DOM element through drupal.behaviours? On my site on the navigation panel I have a dropdown language switcher. (Dropdown Language Switcher module). I need to modify the js file and show the message to the user after he switched the language. What is the right way to modify js file? 

(function ($, Drupal) {
'use strict';

Drupal.behaviors.dropdownLanguagesSelector = {
  attach: function(context, settings) {
   $('.dropdown-language-item .active-language', context).once('dropdown-language-selector')
    .click(function(e) {
      var $wrapper = $(this).closest('.dropbutton-wrapper');
      if ($wrapper.length &gt; 0) {
        e.preventDefault();
        e.stopPropagation();
        $wrapper.toggleClass('open');
      }
    });
  }
};
})(jQuery, Drupal);    


Language switcher HTML looks like following: 

&lt;div class="dropbutton-widget"&gt;
 &lt;ul class="dropdown-language-item dropbutton"&gt;
  &lt;li class="fr dropbutton-action"&gt;
   &lt;span class="language-link active-language" hreflang="fr"&gt;FR&lt;/span&gt;&lt;/li&gt; 
  &lt;li class="dropbutton-toggle"&gt;&lt;/li&gt;
  &lt;li class="en dropbutton-action secondary-action"&gt;&lt;/li&gt;
  &lt;li class="de dropbutton-action secondary-action"&gt;&lt;/li&gt;
 &lt;/ul&gt;
&lt;/div&gt;


I am trying to attach following event: 

$('.secondary-action').click(function(){
   alert(Message!);
})
Here's a skeleton of how you can add functionality to elements using Drupal.behaviors.

(function ($, Drupal) {
  'use strict';

  // Create a new function for each element the file attaches
  // handlers to. In this case, $(.secondary-action')
  function secondaryEventListener(context) {
    // Find the elements, ensure that any internal code is executed
    // a single time using $.once(), then loop through the found elements
    // using $.each()
    $(context).find('.secondary-action').once('secondary-event-listener').each(function () {
      // $(this) refers to the current instance of $('secondary-action')
      $(this).click(function () {
        alert("clicked");
      });
    });
  }

  Drupal.behaviors.someArbitraryButUniqueKey = {
    attach: function(context, settings) {
      // Call your function containing the handlers
      secondaryEventListener(context);
    }
  };
}(jQuery, Drupal));