function toggle(element) {
        if ($(element).is(":visible")) {
            hide(element);
        } else {
            show(element);
        }
    }
Changes the visibility state of a resizable element. The toggle
functionality is added when an element is made resizable.
@param {DOMNode} element Html element to toggle