JSFiddle - React, Tailwind, and code Playground

by Ilia Lesnykh

HTML

<a id="on_off" href="#">Включено</a>

JavaScript

$(function(){
    $('#on_off').on('click', function(event) {
        event.preventDefault();
        var $this = $(this);
        $this.text( $this.text() == 'Выключено' ? 'Включено' : 'Выключено' );
    });
})