I have this td
"named dynamically":
@foreach (var m in Model)
{
<td id="mod @m.codFilial" style="width:auto;">@m.mod</td>
}
As you can see, its ID is named after the value on the foreach
, prefixed by "mod "
.
However, I can't seem to have access to each td
through jquery:
<script>
$("mod #@m.codFilial").append("<p>Text to append.</p>");
</script>
I mean, the text isn't been appended, probably because it's not recognizing the element. Am I misleading the syntax or some logic feature?