Documentation

BX.toggleClass

DOMNode 
BX.toggleClass(
 DOMNode node, 
 string|array className
);

The function toggles the availability/absence of className CSS-class for the node or rotates CSS-classes, if the className – array.

Examples

BX.ready(function(){
    BX.bind(BX("test"), "click", function() {
        BX.toggleClass(BX("test"), ["arrowUp", "arrowDown"]);
    });
})


© «Bitrix24», 2001-2024