jQuery [attribute!=value] Selector Last Updated : 11 Jul, 2025 Suggest changes Share Like Article Like Report The jQuery [attribute!=value] selector in jquery is used to select each element that doesn't have the specified attribute and value. Syntax: $("[attribute!='value']")Parameter: attribute: This parameter is required to specify the attribute to be searched.value: This parameter is required to specify the value to be searched.Example 1: HTML <!DOCTYPE html> <html> <head> <title>jQuery [attribute!=value] Selector</title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("p[class!='intro']").css( "background-color", "green"); }); </script> </head> <body> <center> <h1>Welcome to GeeksForGeeks </h1> <p class="intro">Geeks</p> <p>For</p> <p>GEEKS</p> <p></p> Who is your favourite: <ul id="choose"> <li>Geeks1</li> <li>Geeks2</li> <li>Geeks3</li> </ul> </center> </body> </html> Output: Example 2: HTML <!DOCTYPE html> <html> <head> <title>jQuery [attribute!=value] Selector</title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("p[class='intro']").css( "background-color", "green"); }); </script> </head> <body> <center> <h1>Welcome to GeeksForGeeks </h1> <p class="intro">Geeks</p> <p>For</p> <p>GEEKS</p> <p></p> Who is your favourite: <ul id="choose"> <li>Geeks1</li> <li>Geeks2</li> <li>Geeks3</li> </ul> </center> </body> </html> Output: R rathbhupendra Follow Article Tags : Web Technologies JQuery jQuery-Selectors Explore jQuery Tutorial 8 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like