2

Please see the image below, I'm trying to select this to open the tab.enter image description here

HTML is -

<div class="module collapsed" data-behavior="Quiver.Collapsable" data-collapse-trigger=".module-header">
    <div class="module-header">
      <h3>Admin Activity Log</h3>
    </div>
    <div class="module-content">
      <table class="table table-striped">
        <tbody>
        <% @admin_activity_messages.each do |message| %>
          <tr>
            <td><%= message %></td>
          </tr>
        <% end %>
        </tbody>
      </table>
    </div>
  </div>

CSS is

&.collapsed {
    .module-header:after {
      content: '▼';
    }

    .module-content {
      display: none;
    }

    .module-actions {
      display: none;
    }
  }

Also, I don't think this is duplicated, I need to click this to run a test in order to 'open' this div

  • As a last comment - This is not a duplicated post. I want to click this element. – whoaaallamapajama Apr 10 '15 at 16:35
  • 1
    If so the question should be rephrased. However It *is* still a duplicate of these topics: http://stackoverflow.com/questions/7478336/only-detect-click-event-on-pseudo-element ♦ http://stackoverflow.com/questions/9395858/event-listener-on-a-css-pseudo-element-such-as-before-or-after ♦ http://stackoverflow.com/questions/12692762/use-javascript-to-click-on-a-pseudo-element – Hashem Qolami Apr 10 '15 at 16:39
  • Apart from that you have shown us only HTML (so we can’t see how `::after` does even come into play here) – you can not react on a click _specifically_ on such a pseudo element, you can only react to clicks on the element that `::after` is applied to itself. – CBroe Apr 10 '15 at 16:39
  • I added the :after code. I was searching code base for ::after. Sorry for that... – whoaaallamapajama Apr 10 '15 at 16:44
  • @HashemQolami I can't distill those 3 separate posts into any solution for my problem. Can you please remove the duplicate tag OR point me to a more specific duplication... – whoaaallamapajama Apr 10 '15 at 16:55
  • 2
    The first and second link explain why it is not possible to bind any event to pseudo-elements and the third link provides a workaround for that: Rather than using pseudo-elements, append an element — which has an `onclick` event attached — to the container dynamically. – Hashem Qolami Apr 10 '15 at 17:09

0 Answers0