Select by attribute name negation

Description

The following code shows how to select by attribute name negation.

Example


<!DOCTYPE html>
<html>
<head>
<script
  src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
  <!-- ww w . ja va 2s .c om-->
</script>
<script>
  var userInfo = $("[id!='cheese']").length;
  document.writeln(n);
</script>
</head>
<body>
  <div id="eggs"></div>
  <div id="ham"></div>
  <div id="cheese"></div>
</body>
</html>

Click to view the demo





















Home »
  jQuery »
    jQuery Example »




Animation
DOM
Event
Form
List
Select
Style
Table
Utilities