Jquery contains method not work if the string has space

In Jquery, “Contains” method not work if the string has space with it.
For Example, I want to select a dropdown value (Ex: 1st Letter) through JQuery.

If I give like below, it is working fine

$('.z-comboitem-text:contains(1st)')

If I give like below, it is not working

$('.z-comboitem-text:contains(1st letter)')

Please give you suggestions
Thanks in Advance.


Source: jquery

Leave a Reply