I have some code as below
<div class="box coursebox">
<h3 class="main"><a title="GCSE English" href="http://vle.sheffcol.ac.uk/moodle/course/view.php?id=1656">GCSE English</a> </h3>
</div>
<div class="box coursebox">
<h3 class="main"> <a title="GCSE Maths" href="http://vle.sheffcol.ac.uk/moodle/course/view.php?id=1526">GCSE Maths</a> </h3>
<div class="assign overview">
<div class="name"> Assignment: <a title="Assignment" href="http://vle.sheffcol.ac.uk/moodle/mod/assign/view.php?id=59691">Algebra assignment 1</a> </div>
<div class="name"> Assignment: <a title="Assignment" href="http://vle.sheffcol.ac.uk/moodle/mod/assign/view.php?id=59691">Algebra assignment 1</a> </div>
</div>
</div>
What I want to do it use jquery to add the following bit of HTML
<span class="button" id="button">Show activities</span>
to each coursebox after the H3 tag IF there is a div.overview as a child.
Firstly, is this possible, and if so how?
Thanks
Kieran