I want to hide a label using the fadeOut effect but when it is completed I want to insert inside it a
$('label.alert').fadeOut('slow',function(){$(this).text(' ');});
but it produces a as a raw text. Any ideas ?
I want to hide a label using the fadeOut effect but when it is completed I want to insert inside it a
$('label.alert').fadeOut('slow',function(){$(this).text(' ');});
but it produces a as a raw text. Any ideas ?
Be careful with using .html() or the same methods using another framework/library (e.g v-html in Vue.js), because it has XSS vulnerability. Read more about XSS from this answer.
Working way via .text():
You can simply replace with \xa0 for text messages.