I would like to be able to look in the first span
within a div with a class of t_links
and buy
and detect if the string Account
appears. If it does then I want to set some tracking code in jQuery/JavaScript.
There will always be one span
within this div. How can I search the contents for an instance of Account
using jQuery?
<div class="t_links buy">
<span><a class="" href="https://www.ayrshireminis.com/account/login/">Account</a></span>
</div>