1
It's simple, have a look:
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- $("a[href$='.org']").css("background-color", "yellow");});
- </script>
- </head>
- <body>
-
- <a href="https://www.w3schools.com">w3schools.com</a><br>
- <a href="http://www.google.com">Google.com</a><br>
- <a href="http://www.wikipedia.org">wikipedia.org</a>
-
- </body>
- </html>
https://www.w3schools.com/jquery/jquery_ref_selectors.asp