1

How can I tell jquery to hide all id's starting with #ms_?

What I've tried

$("#ms_" + $("*")).hide();
$("#ms_" + "*").hide();
$("#ms_" + *).hide();
rabotalius
  • 1,290
  • 5
  • 17
  • 27

2 Answers2

3

try this

$('[id^="ms_"]').hide();

see http://api.jquery.com/category/selectors/

Suresh Atta
  • 118,038
  • 37
  • 189
  • 297
1

Use the attribute starts with selector :

$('[id^="ms_"]').hide();
Denys Séguret
  • 355,860
  • 83
  • 755
  • 726