over 8 years ago
it helps in reducing set matched of elements to those that have descendant to the matched set of values
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>has demo</title> <style> .full { border: 1px solid red; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <ul><li>Does the UL contain an LI?</li></ul> <script> $( "ul" ).append( "<li>" + ( $( "ul" ).has( "li" ).length ? "Yes" : "No" ) + "</li>" ); $( "ul" ).has( "li" ).addClass( "full" ); </script> </body> </html>
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)