1

How can I select non valid html element using jquery, I have image with invalid tag left; like

<img left; src="..." />

This semicolon is problematic part, I tried with $('img[left]').removeAttr('left').attr("align","left"); but that not match my semicolon;

How to do this?

panjo
  • 3,467
  • 11
  • 48
  • 82

1 Answers1

1

Try $('img[left\\;]').removeAttr('left;').attr("align","left");

DGS
  • 6,015
  • 1
  • 21
  • 37