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,430
  • 5
  • 18
  • 27

2 Answers2

3

try this

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

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

Suresh Atta
  • 120,458
  • 37
  • 198
  • 307
1

Use the attribute starts with selector :

$('[id^="ms_"]').hide();
Denys Séguret
  • 372,613
  • 87
  • 782
  • 758