Find specific li element

Find specific li element

Hi,

I have a list where one element has the attribute active="" and a data-id="something". How can I get the data-id value of this specific li element?

This is how the list looks like

  1. <li class="client with-menu" data-id="126"></li>
    <li class="client with-menu" active="" data-id="132"></li>

I tried to find the element by using $("li[active='']") but this returns following Object { selector: "li[active='']", length: 0, prevObject: Object, context: HTMLDocument → / }