javascript - jQuery .html() of all matched elements -


.html() function on class selector ($('.class').html()) applies first element matches it. i'd value of elements class .class.

you selection elements class .class gather html content need walk trough of them:

var fullhtml;  $('.class').each(function() {    fullhtml += $(this).html(); }); 

search items containig text inside of it:

$('.class:contains("my search")').each(function() {    // somethign }); 

code: http://jsfiddle.net/cc2rl/1/


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -