I need to add a class to <a>, which is added programmatically. When I call addClass, it does not add it, I assume that the plugin has not yet completed the installation of all its bits and parts, so the anchor does not exist yet.
The page is here . This is the login bar at the top. I want to add a class to the login and registration buttons, for example.
jQuery('.bp-login a').addClass('simplemodal-login');
jQuery('.bp-signup a').addClass('simplemodal-register');
HTML for this section
<ul class="main-nav">
<li class="bp-login no-arrow">
<a href="http://nicolaelvin.com/community/wp-login.php?redirect_to=http%3A%2F%2Fnicolaelvin.com%2Fcommunity">Log In
</a>
</li>
<li class="bp-signup no-arrow">
<a href="http://nicolaelvin.com/community/register/">Sign Up
</a>
</li>
...</ul>
source
share