Add class to signup page form fields with jQuery (1 post)

  1. Chad
    Posted 3 years ago #

    I am trying to add a unique class to each label field on the default wp-signup.php page.

    Here is the code I have right now and its not working:

    //Add unique class to signup form label
    function ra_add_tags(){ ?>
    	<script type="text/javascript">$('form').find('label').addClass('mynewclass');</script>
    function ra_add_tags_classes () { add_action('wp_head','ra_add_tags', 99); }

    I realize that function doesn't take into account my need for unique classes for each label, but I cannot seem to even get it to add the class of mynewclass to all of them at once.

    I have verified that my jquery is coming after jquery is loaded in the head.

    I just think my function maybe firing before the actual page has generated the <form> html

    Thoughts on how I can get this to work? And how I can make it so that it automgically makes them unique to each label too?


Topic Closed

This topic has been closed to new replies.

About this Topic