How to use [attribute$=value] Selector Method in JQuery

This article describe about [attribute$=value] Selector Method in JQuery.
  • 1970

Use [attribute$=value] Selector method in jQuery

This method is use to href attribute that ending with ".jpg".

The value is ends with ".org".

The Attributes selector is select all specific attributes.

The attribute value selector ends a specific string.


<!DOCTYPE html>



<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("a:[href$]").css("background-color", "yellow");






<a href=""></a>

<br />

<a href=""></a>

<br />

<a href=""></a>





You may also want to read these related articles here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.