\'.$i.\'
$i is auto generated by loop - which could lead to:
\'.$i.\'
\'.$i.\
If you don't have any other way to identify the The .text() method will return the text content for that If you only wanted the HTML If the HTML (Requires jQuery 1.4 or later)$('div').click(function() {
var text = $(this).text();
// do something with the text
});
click
event on certain $('div.myClass').click(function() {
var text = $(this).text();
// do something with the text
});
$('#parentID').delegate('div.myClass', 'click', function() {
var text = $(this).text();
// do something with the text
});