• Resolved minguet

    (@minguet)


    View post on imgur.com

    – sidr-close
    – mobile-nav
    – mobile-menu-search

    and really side mobile menu is down <script>

    I trying make form with id, and see have twice heheh…
    Then, try .remove() this 3 element, but then no have none…

    I guess I can give him a class, and take the second…

    or some idea?? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter minguet

    (@minguet)

    *sorry my bad english

    I think understand it.
    1. Those 3 elements was are loaded.
    2. sidr replicate those 3 elements content.

    Result: twice elements

    I was be trying catch an checkbox form in mobile menu by element id, and always all unchecked.
    what was happening is that I was fill out the form in sidr (2) but reading the (1)

    SOLUTION (for lack of something better)

    * it is necessary to place the code somewhere in the mobile menu.
    It will not serve place it in additional JS.
    I pasted it in a mobile menu link, just after the visible name: Link_Text <script> … </script>

    * It will be executed twice, when loading nav-menu and when creating the sidr.
    Therefore, it must be prevented from running the first time, so that sidr can correctly replicate the 3 elements before deleting them (if)

    <script>
    if ( document.getElementById('sidr') ) {
      document.getElementById('sidr-close').remove();
      document.getElementById('mobile-nav').remove();
    /* Only if search menu is active */
      document.getElementById('mobile-menu-search').remove();
    }
    </script>

    Hello,

    It seems you have found a solution. Let me know if you are still looking for help.

    Hello could anyone help me out i am getting my blog content twice.
    One time above the header and one time on main post please help:
    https://jamiapapers.com/how-to-crack-neet-entrance-exam-by-self-study/

    @hellowords you are using a different theme so please contact the related theme support. We provide support only for the oceanwp theme here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘why twice sidr elements?’ is closed to new replies.