Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

JQuery

<!DOCTYPE html>
<html>
<head>
<title>Try jQuery Online</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
   var input = $('#username1')
   var progres = $(input).next().children()
   console.log('input ', progres.css("background", "yellow"))
});

</script>
<style>
.selected { 
    color:red; 
}
.highlight { 
    background:yellow; 
}
</style>
</head>
<body>
<input id='username1' value='ddd' />
<div class='test'>
    <p class='progress'>tes tes tes tes tes tes</p>
</div>
<hr />
<input id='username2' value='ddd' />
<div class='test'>
    <p class='progress'>tes tes tes tes tes tes</p>
</div>
<hr />
<input id='username3' value='ddd' />
<div class='test'>
    <p class='progress'>tes tes tes tes tes tes</p>
</div>
<hr />
<input id='username4' value='ddd' />

<div class='test'>
    <p class='progress'>tes tes tes tes tes tes</p>
</div>
<hr />
</body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.