event handling

event handling

Hi @all, 

im new to jquery - fourth day - n searching for a function which allows me to start different actions by multiple clicks. Code until yet is this:

  1. <script>
          $(document).ready(function(){
                $("#button_toggle").click(function(){
                      $("div").toggleClass("toggle_black");
                      if (document.getElementById('eins').innerHTML === "Dies ist ein Paragraph")
                            $("#eins").text($("#eins").text() + " im dark-mode");
                      if (document.getElementById('zwei').innerHTML === "Dies ist ein weiterer Paragraph")
                            $("#zwei").text($("#zwei").text() + " im dark-mode");
                      if (document.getElementById('drei').innerHTML === "Dies ist noch ein Paragraph")                    
              $("#drei").text($("#drei").text() + " im dark-mode");
I thought I have to add a second .click(…) but that is running simultaneously with the first one. Neither is .onclick(...) working (for good reasons). So how can I switch back to bright mode with a second click on the same button? Anybody here who wants to help me out?

Hvgd =))