If my original function was:
document.getElementsByClassName(\'blah\')[9].innerHTML = \'blah\';
...how would I change that so I get that sa
Try this
$('.blah').eq(9).html('blah');
Try this
$(".blah:eq(9)").html('blah');
You should also just be able to use jQuery's get() method:
$('.blah').get(9)
jQuery objects also function as indexed arrays as returned elements, so this should also work:
$('.blah')[9]
Another answer could be:
$($(data).find('.blah')[9]).html();
When you use [9] it returns a DOM object which doesn't know what function html() is but without [9] it returns a jQuery Object which the html() function is apart of.
The equivalent of
document.getElementsByClassName('blah')[9].innerHTML = 'blah';
is to use the :eq pseudo-selector:
$(".blah:eq(9)").html('blah');
or the eq function:
$(".blah").eq(9).html('blah');
(...and then the html function to set the inner HTML.)
$('.blah')[9].innerHTML="BLAH";
This should solve your problem