In my jquery script I need to dynamically translate some content, so part of such function is
$('#password').attr('placeholder','Contraseña');
where I tried to change placeholder attribute to text Contraseña.
Unfortunatelly, jquery shows text Contraseña
What does a trick to force jquery to show correct decoded text?
Anonymous User
08-Oct-2013You have to escape special characters using JavaScript syntax, not HTML syntax.
Personally I'd use .prop() instead of .attr() too, though both should work here.