JSFiddle - React, Tailwind, and code Playground

by mtenschert

JavaScript

function clickFunctionNewTranslations() {

  $("ul.list-unstyled>li").click(function() {

    var buttons_length = $(".person-menu__person--active").find(".button-container button").length;

    if (buttons_length == 1) {

      //$(".button.red.person__back-to-person").text("1 Button");
      console.log("1 Button");

    } else if (buttons_length == 2) {

      //$(".button.red.person__back-to-person").text("2 Button");
      console.log("2 Button");
      
    }

  });

}