toggle sound imagepuzzle - enhancement

by bobbyrne01

HTML

<button type="button" id="soundClick">Disable sound</button>

JavaScript

var sound = "on";

$('#soundClick').on('click', function(e) {
    if (sound == "on") {
        sound = "off";
        $(this).html('Enable sound');
    }
    else {
        sound = "on";
        $(this).html('Disable sound');

    }
});