I saw this code snippet:
$("ul li").text().search(new RegExp("sometext", "i"));
and wanted to know if this can be extended to any string?
I want to accomplish the following, but it dosen't work:
$("li").attr("title").search(new RegExp("sometext", "i"));
Also, anyone have a link to the jQuery documentation for this function? I fail at googling apparently.
if (str.toLowerCase().indexOf("yes") >= 0)
Or,
if (/yes/i.test(str))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With