-2

Currently I have the following:

 $("textarea").each(function () {

    });

I like to do the loop only for textareas where the element name starts with dvSummary.

Nate Pet
  • 44,246
  • 124
  • 269
  • 414

1 Answers1

0

Use an 'attribute value starts with' selector, such as:

$("textarea[name^='dvSummary']")

See documentation here https://api.jquery.com/attribute-starts-with-selector for more examples.

Daniel
  • 3,312
  • 1
  • 14
  • 31