Javascript examples for jQuery:String
JQuery html() vs. string
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript"> $(window).load(function(){/*from www . ja v a 2 s. c o m*/ $('li').each(function (i) { if ($(this).html() == 'Three') console.log('Three'); }); }); </script> </head> <body> <ul> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul> </body> </html>