hankknight
asked on
jQuery: First class that ends with match
Using JavaScript/jQuery, how can I get the first class item that ends with "aspx"?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demo</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
alert('The first class item in the body tag that ends with aspx is ' + 'exampleaspx');
});
</script>
<style type="text/css">
div {
width: 100px;
height: 100px;
margin: 50 auto;
border: 5px solid black;
}
</style>
</head>
<body class="hello world exampleaspx test sampleaspx">
<div>
</div>
</body>
</html>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.