Title: Hidden elements
Last modified: August 31, 2016

---

# Hidden elements

 *  [Tomasz Dobrzyński](https://wordpress.org/support/users/tomaszdobrzynski/)
 * (@tomaszdobrzynski)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/hidden-elements-1/)
 * You should consider object visibility I think.
    Let’s assume you use shortcode
   to present video on some page but container which holds Lyte element is hidden.
   Once you make it visible onclick action won’t work. I think you should check 
   whether object is really visible or not. Proposed change in lyte.(min).js:
 *     ```
       for (var i = 0, lln = lts.length; i < lln; i += 1) {
       	    p = lts[i];
       	    if(p.offsetParent !== null) { //CHECKS WHETHER OBJECT IS VISIBLE OR NOT
       		    vid = p.id.substring(4);
       		    if (mOs === null) {
       ```
   
 * Once block shows (i.e. popup) developer will be able to execute `ly.te()` once
   again and display correct video instance. What do you think?
 * [https://wordpress.org/plugins/wp-youtube-lyte/](https://wordpress.org/plugins/wp-youtube-lyte/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/hidden-elements-1/#post-7059709)
 * >  Once you make it visible onclick action won’t work.
 * just tested this; what I see is the lyte onclick works (so the youtube iframe
   will start to load), but subsequent clicks on video in the youtube player did
   not work. is that what you mean?
 * frank
 *  Thread Starter [Tomasz Dobrzyński](https://wordpress.org/support/users/tomaszdobrzynski/)
 * (@tomaszdobrzynski)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/hidden-elements-1/#post-7059710)
 * Frank, that’s right, exactly.
    Btw: I think “Visual Event” plugin would be helpful
   in diagnosis of this case.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/hidden-elements-1/#post-7059713)
 * OK, I see. And with your fix this problem doesn’t occur, but that will require
   the developer who unhides a lyte-div to call ly.te() him- / herself? Do you have
   this running somewhere?
 * frank
 *  Thread Starter [Tomasz Dobrzyński](https://wordpress.org/support/users/tomaszdobrzynski/)
 * (@tomaszdobrzynski)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/hidden-elements-1/#post-7059717)
 * Yes, to generate working player with active onclick event you need to execute
   ly.te() once again when popup is opened (when its content is already visible).
   
   It’s internal project but today I’ll try to clone problematic section somehow.
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/hidden-elements-1/#post-7059758)
 * not ly.te to visible elements would indeed require extra work for the developer.
   what if we were to apply an eventhandler to the hidden divs which automatically
   applies ly.te() when they become visible. not sure if this is possible, but would
   be nicer, no?
 * frank

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Hidden elements’ is closed to new replies.

 * ![](https://ps.w.org/wp-youtube-lyte/assets/icon-128x128.png?rev=1836005)
 * [WP YouTube Lyte](https://wordpress.org/plugins/wp-youtube-lyte/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-youtube-lyte/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-youtube-lyte/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-youtube-lyte/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-youtube-lyte/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-youtube-lyte/reviews/)

## Tags

 * [hidden](https://wordpress.org/support/topic-tag/hidden/)
 * [popup](https://wordpress.org/support/topic-tag/popup/)

 * 5 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/hidden-elements-1/#post-7059758)
 * Status: not resolved