Set value for dynamic class in CSS or jQuery

I have a Facebook comment module installed in WordPress, for some unknown reason, Facebook made some changes, and now the class I need to change is dynamic, for example, #feedback_7324324h , #feedback_kjwyhr , #feedback_234734dsfn , etc., the only equal part is #feedback_ is there any way or chance to set the width to 100% for any element that contains #feedback_ as a class?

0
jquery css css3 facebook wordpress
Mar 18 '14 at 21:26
source share
2 answers

You can use an attribute starting with a selector (does the hash at the beginning of the class seem strange?)

 jQuery('[id^="feedback_"]').css('width', '100%' ); 
+4
Mar 18 '14 at 21:29
source share

Yeah like that

 $("[class^='#feedback_']") 

Docs --> https://api.jquery.com/attribute-starts-with-selector/

+2
Mar 18 '14 at 21:29
source share



All Articles