Home
Developers

Developers

  • Documentation
    • Developer Guide
    • API Reference
    • Style Guide
    • How-To
    • Troubleshooting
  • Submit a Flake
  • Support

Pageflakes API Reference

  • Flake System Object
  • Flake User Object
  • Pageflakes Functions
    • DOM Manipulation
    • Element Visibility
    • Element State
    • Class Manipulations
    • Positioning
    • Cursor
    • Progress Bar
    • Element Opacity
    • Cookies
    • Miscellaneous
    • Events
    • Window
    • XML
    • Page
  • Array Extensions
  • String Extensions
  • ContentProxy
  • App
  • RSS
  • Tooltip Manager
  • Public, Shared, and Private Pages
  • Server-Side Scripting
Home » Documentation » API Reference » Pageflakes Functions

Element Visibility

nodisplay(e)
nodisplay(id)
ND(e)
ND(id)

Instead of:

e.style.display = "none";

Use any of the following:

PF.nodisplay(e);
PF.nodisplay('mydiv');
PF.ND(‘mydiv’);

T(e, text)
T(id, text)
setInnerText(e, text)

Instead of:

if (mz)
	  e.textContent = text;
else
	  e.innerText = text;

Use either of the following:

PF.T('mydiv', 'text to set');
PF.T(e, 'text to set');

display(id)
D(e)
D(id)

Instead of:


e.style.display = "block";

Use any of the following:

PF.display(e);
PF.display('mydiv');
PF.D(‘mydiv’);

isVisible(e)
isVisible(id)

Returns true if the element
is visible; false otherwise.
clearDisplay(el) Clears the e.style.display property and reverts to what is defined in CSS.
hide(el) Sets visibility style to hidden.
visible(el) Sets visibility style to visible.
toggleDisplay(el) Toggles display attribute to show/hide element.
switch(display, nodisplay)

Displays the first item and hides the second item.


PF.switch( divToShow, divToHide )

toggleVisibility(name) Toggle display style between “none” and “block”.
canYouSeeMe(target) Returns true if the item is
visible on the screen, or false if it is not
visible. It does so by walking through the ancestors and checking whether any
of them has the display attribute set to none or the visibility attribute set to hidden.
‹ DOM ManipulationupElement State ›
»
  • Printer-friendly version