So I cant get these buttons to work. I've tried so many different ways. So what I've got is multiple "player" objects and they all have .div_tab buttons. And I need to be able to do things on that separate player when I click that players button. This code does nothing when I click the button.
Why? How to fix? thank you!
$(document).ready(function() {
  for (let i in players)
  {
    $(players[i].div_tab[0]).on('click', function() {
      console.log("Hello world!");
    });
  }
});
(edit)
I create the tabs with this code:
  this.addTab = function(name, id)
  {
    this.tabs.html(this.tabs.html() + "<div class='tab' id='"+id+"'>"+name+"</div>");
  }
  this.addTab("Select", "select");
  this.addTab("Customize", "customize");
  this.addTab("Audio Line", "audio-line");
  this.addTab("Audio Circle", "audio-circle");
  this.div_tab = this.tabs.find('div.tab');
 
     
    