Set text-decoration
Description
The following code shows how to set text-decoration.
Example
<html>
<head>
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {<!-- ww w. j a va 2 s . co m-->
$("div:contains('J')").css("text-decoration", "underline");
});
</script>
<style>
div {
background: yellow;
width: 80px;
height: 80px;
margin: 5px;
float: left;
}
</style>
</head>
<body>
<div>Java</div>
<div>C#</div>
<div>JavaScript</div>
<div>CSS</div>
<div>Ja va2s.com</div>
<div>ja va2s.com</div>
<div>Java2s.com</div>
</body>
</html>