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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -