jQuery 1.8.1 | How to get dynamically set li number of ol with corresponding title?

jQuery 1.8.1 | How to get dynamically set li number of ol with corresponding title?

Is there a way to get the li number and title (after clicking on the li) of an ordered list that is set dynamically via ajax or jason? I use this as example for displaying the li in the hard-coded ol:

  1. $("#List ol").append('<li><p>' + '<img src="'+thumbnail+'"'/><br />' + '<span class="title">'+imageTitle+'</span></p></li>');

A function dynamically fetches (after selecting an option from a pulldown menu) the thumbnails (fixed amount of 25 thumbs) and displays them (with their titles) in the ol div. The ordered list starts with the numbered li followed by the thumbnail image and the title below it. I managed to trim, splice, and join the title part but that's based on a variable which fetches the Youtube video title, like so:

  1. var videoTitle = data.feed.entry[x].title.$t;
  2. var trimTitle = $.trim(videoTitle).substring(0, 70).split(" ").slice(0, 12).join(" ");

How can I get the selected li number (without the thumbnail) and corresponding title (trim-spliced like above) so they can display in a div? - dan