22 Replies Latest reply on Feb 23, 2017 3:37 AM by Himanshu Joshi

    Hiding/removing empty web app fields in <div>

    Mayan Media Level 1

      Hi,

       

      I'm currently building a website directory.

       

      I need to display some web app results wrapped in a styled <div> container. However not all web app fields will be relevant to all web app items in the detailed layout... So, if a field in the web app is left blank, I need the styled <div> associated with that web app field tag to be hidden.

       

      I believe this is possible with jquery and/or Javascript but I literally have no idea!

       

      So, if the code currently looks like this, how can I hide it if the web app tag is empty?

       

       

      <div class="wiltshire"> {tag_listing region(s)} </div>

       

      <style>

          div.wiltshire {

              height: 35px;

              width: 250px;

              background-color: black;

              font-family: comfortaa;

              font-size: 12px;

              color: white;

          }

      </style>

       

      Thanks!