jquery - Outputting String to HTML using javaScript -


there have been many questions before, answer involved referencing element outputted within script. in case, elements created dynamically on load (it's hosted on tumblr, specific), there's no referable id each of elements need output string to.

is possible this? jquery can used if makes things simpler. function takes string input , outputs string using return.

$('.post .posttext a') -> returns array of a elements.

$('.post').eq(the post number).find('.posttext a') -> replace "the post number" number of post if want target more specific.

you can call text("your text") method set text.


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

php - Redirect and hide target URL -