code: def toggle(self):
          
          self._stable = False
          return self.show() if self.attrs["style"]["display"] == "none" else self.hide()
docs: Same as jQuery's toggle, toggles the display attribute of this element.