Check text with contains in iFrame
Hi
Just whant to get this conditional works. The HMTL-Codes looks like this:
- <div id="availableLanguagesContainerBody">
- <a onclick="changeUserLanguage('EN')" href="#"> English </a>
- </div>
With JS and JQ I whant to check if the User choosed "English" or other languages.
- if ($('iframe').contents().find("#availableLanguagesContainerBody a:contains('English')")) {
- //do JS//;
- }
Javascript allways says that this text/object exist, even there is something else.
Do you have an idea?
Thank you for your reply.