npm

Need private packages and team management tools?Check out npm Orgs. »

hidden

1.1.1 • Public • Published

hidden

Cross browser Element#hidden

Example

hidden(elem) returns whether that element is hidden. hidden(elem, value) sets the hidden property on the element.

This shims older browsers using style.display = "none"

var hidden = require("hidden")
 
    , a = document.getElementById("a")
    , b = document.getElementById("b")
 
console.log("a isHidden", hidden(a))
console.log("b isHidden", hidden(b))
 
setTimeout(function () {
    a.textContent = "now shown"
    b.textContent = "now hidden"
 
    hidden(a, false)
    hidden(b, true)
}, 2000)

Installation

npm install hidden

Contributors

  • Raynos

MIT Licenced

Keywords

none

install

npm i hidden

Downloadsweekly downloads

7

version

1.1.1

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability