This is a simple one I created to be a more accurate varient of the
:contains() selector. This will select everything where the contents is exactly what you tell it. It was originally created for a game platform drop-down selector where contains was pulling to many results, for example there are 4 sony system, all with very similar names; Playstation, Playstation 2, Playstation 3, and Playstation Portable. If you use
:contains() for "Playstation" you'll pull all four system. This new
:is() selector fixes this and is much faster than looping through a list and comparing them one-by-one.
If you have any questions it let me know. Use it in a cool project, do the same.
You need to login to post a comment.