KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I would like to perform something with all my text areas, however selecting all of them with $("textarea") wont do. Here's what I am trying to do in Pseudo code : for each textarea do alert(textarea.val) In my case, I need to do a Word replacement in all of my textareas, so I thought doing it with iteration would be a lot cleaner, however I cant figure out how to do it. Here is what I currently do, which is very tedious: var txtcode = $("#txt_banner1").text().replace("AFFURL",producturl); $("#txt_banner1").text(txtcode); var txtcode = $("#txt_banner2").text().replace("AFFURL",producturl); $("#txt_banner2").text(txtcode); ... and on and on.... Thanks!
Tags (comma-separated)
Save Edits
Cancel