jquery - How to get the class name of a child element with content “XX”? -


How to get the class name of a child element with the content "This is active"? I know the id name 1 with the original element div .

  & lt; Div id = 'name1' & gt; & Lt; Div class = 'name 2' & gt; & Lt; Period & gt; & Lt; One square = 'active name a' & gt; It's active & lt; / A & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; Div class = 'name1' & gt; & Lt; Period & gt; & Lt; One class = 'no-active' & gt; Not active & lt; / A & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

You can try this approach:

 < Code> warning ($ ("A: happens ('this is active')"). Et ("square"));  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -