hidden
Cross browser Element#hidden
Last updated 6 years ago by raynos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hidden 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.1                                ...           latest (4 years ago)

4 Versions

  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (2)
Downloads
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |