How to trigger an action after the firebase-web result is recieved and manipulated
<p>In my application I am requesting some results from Firebase and then I append it to my web page and then after I need to iterate the appended list items and I need to make some further functions but when I enter the code after the manipulation of Firebase result still it run before the Firebase result is appended.</p>

<p>How can I reiterate the list items after they're appended?</p>

<pre><code>myfirebaseRef.child('subjects').orderByChild('course').equalTo('UG476BCS').on('child_added',function(subjectSnap){
    var subject=subjectSnap.val();

    $('#my-web-page .course-subjects').append('' +
        ' &lt;li class="list-group-item "&gt;' +
        '&lt;div class="row padding-left-10"&gt;' +
        '&lt;div class="col-md-8"&gt;' +
        '&lt;span&gt;' + subject.name + '&lt;/span&gt;' +
        '&lt;/div&gt;' +
        '&lt;div class="col-md-1"&gt;' +
        '&lt;button class="btn btn-primary"&gt;pp&lt;/button&gt;' +
        '&lt;/div&gt;' +
        '&lt;/div&gt;' +
        '&lt;/li&gt;'
    )
});

$('#my-web-page .course-subjects li ').each(function(index){
    console.log(index);
});
</code></pre>