Skip to main content
added disclaimer
Source Link
Matthew Crumley
  • 102.9k
  • 24
  • 105
  • 131

I'm leaving this here for reference, since it could be useful in slightly different circumstances, but, like karim79 mentioned, it matches anything that has 64 as a substring.


You should be able to use the ":contains(text)" pseudo-selector:

$("SectionAnswers SourceAnswerID:contains('64')", Section)

That will select the SourceAnswerID elements, so you might need to use the parent() or closest() function to move up the hierarchy.

You should be able to use the ":contains(text)" pseudo-selector:

$("SectionAnswers SourceAnswerID:contains('64')", Section)

That will select the SourceAnswerID elements, so you might need to use the parent() or closest() function to move up the hierarchy.

I'm leaving this here for reference, since it could be useful in slightly different circumstances, but, like karim79 mentioned, it matches anything that has 64 as a substring.


You should be able to use the ":contains(text)" pseudo-selector:

$("SectionAnswers SourceAnswerID:contains('64')", Section)

That will select the SourceAnswerID elements, so you might need to use the parent() or closest() function to move up the hierarchy.

Source Link
Matthew Crumley
  • 102.9k
  • 24
  • 105
  • 131

You should be able to use the ":contains(text)" pseudo-selector:

$("SectionAnswers SourceAnswerID:contains('64')", Section)

That will select the SourceAnswerID elements, so you might need to use the parent() or closest() function to move up the hierarchy.