Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Joe Bruno
35,909 PointsjQuery .before .after & Wordpress wp-login.php file
Hello All,
I am using the wordpress plugin Register Plus Redux to create a custom Wordpress Registration page. The plugin is designed to add custom registration fields; however, it does not provide a default option to wrap certain groupings of those custom fields (mainly p tags) in divs for styling purposes; I have written a brief jQuery function to accomplish this; however, when my jQuery executes, it correctly inserts the div where desired, but for some reason (perhaps wordpress) the opening div auto-complete the closing div tag and the "after" function never executes. Thoughts?
<script type="text/javascript">
jQuery(document).ready(function($) {
$( '#student_name-2-p' ).before( "<div id='add_student_wrapper'>" );
$('#activities-4-p').after( "</div>" );
});
</script>