I have problem with condition of Germany charset:
if (jQuery(this).find("dt").text()=="Kälteleistung")
Its always return false but in jQuery(this).find("dt").text()
alert print Kälteleistung
I have problem with condition of Germany charset:
if (jQuery(this).find("dt").text()=="Kälteleistung")
Its always return false but in jQuery(this).find("dt").text()
alert print Kälteleistung
if(jQuery(this).find("dt").text()==jQuery("<div/>").html("Kälteleistung").text())
This simple solution help me. There are we are find special char of ä
char. We are formed string for condition "Kälteleistung"
and our task is return string which be same as we take in our html. We are need place it to html jQuery("<div/>").html("Kälteleistung")
and take it .text()
. Very simple and clear solution which does not require a third-party libraries.
Thanks!
I got your question working, without the need of extra stuff. I think your problem is in the selector not working good (there is no need to use find
).
I have this sample, returning 'ok':
<div>Kälteleistung</div>
<script>
if ($("div").text()=="Kälteleistung")
{
alert('ok');
}
else
{
alert('not ok');
}
</script>