function toggleVisibility(className, condition) {
    var toggleItems = document.querySelectorAll(className);
    // Transforming node list to array in order to loop through it
    var newtoggleItems = Array.prototype.slice.call(toggleItems);

    newtoggleItems.forEach(function (el) {
        return el.style.visibility = condition;
    });
}
//Function which switches between properties 'visible' & 'hidden'. Function is triggered once user hits the button
Function which switches between properties 'visible' & 'hidden'. Function is triggered once user hits the button
Function which switches between properties ' visible ' & ' hidden ' . Function is triggered once user hits the button
function toggleVisibility(className, condition) {
    var toggleItems = document.querySelectorAll(className);
    var newtoggleItems = Array.prototype.slice.call(toggleItems);
    newtoggleItems.forEach(function (el) {
        return el.style.visibility = condition;
    });
}
function toggleVisibility ( className , condition ) { var toggleItems = document . querySelectorAll ( className ) ; var newtoggleItems = Array . prototype . slice . call ( toggleItems ) ; newtoggleItems . forEach ( function ( el ) { return el . style . visibility = condition ; } ) ; }
Function which switches between properties 'visible' & 'hidden'.
Function which switches between properties ' visible ' & ' hidden ' .
// Transforming node list to array in order to loop through it