Element Selector (“element”) in JQuery



version added: 1.0jQuery(‘element’)

  • element
    An element to search for. Refers to the tagName of DOM nodes.

JavaScript’s getElementsByTagName() function is called to return the appropriate elements when this expression is used.


Finds every DIV element.

<!DOCTYPE html>
  div,span {
    width: 60px;
    height: 60px;
    padding: 10px;
    margin: 10px;
    background-color: #EEEEEE;
  <script src="/scripts/jquery-1.4.js"></script>

<script>$("div").css("border","9px solid red");</script>

Leave a Reply

Your email address will not be published. Required fields are marked *