Advertisement
immbudden

eachFunction

May 1st, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.36 KB | None | 0 0
  1. $("SPEECH",currentContext).each(function(){
  2.             var speaker = $("#selectSpeaker").val();
  3.             if($(this).find("SPEAKER").text()===speaker){
  4.                 var line = $(this).find("LINE").text();
  5.                 line.each(function(){
  6.                 var singleLine = $(this);
  7.                 $("#speakers").append("<p class='speech'>" + speaker + "</p>" + "<p>" + singleLine + "</p>");
  8.             });
  9.             }
  10.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement