Saturday, 15 September 2012

jquery - .get trying to catch length and append to element -



jquery - .get trying to catch length and append to element -

$('.statused tr .tcr').after('<td class="tc2"><span class="views">0</span> users viewing</td>'); var href = $('.statused .hierarchy a.forumtitle').attr('href'); $.get(href , function(data) { var elem = $(data); var count = $('.listeduser a').length; $('.views').html(elem.find()); }, 'html');

ok can see trying length of hrefs on each href. can't figure out how write lastly bit on $('.views').html(elem.find()); guess bit confusing me really. have simple markup

http://jsbin.com/ijidob/1/

easier see there. need count on each href per tr.

someone have ideas how prepare lastly line run code correctly?

jquery get

No comments:

Post a Comment