Blog

Jquery using make change in stylesheet

Posted by Dhaval Patel Blogs | .NET 4.5 Dec 10, 2011
How to make change in style for using jquery
Jquery script  and Style :

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

<script type="text/JavaScript" src="../jquery-1.4.2.min.js"></script>

<script type="text/JavaScript">
$(document).ready(function(){
$('tr').mouseover(function() {
$(this).addClass('zebraHover');
});
$('tr').mouseout(function() {
$(this).removeClass('zebraHover');
});
$("#div1").css({'border':'1px solid red','font-size':'12px','font-weight':'bold'});
$("#div1").height();
$("#div1").height(120);
$("#div1").width();
$("#div1").width(200);

//alert(getyear());
});

</script>

<style type="text/css">
tr.zebraHover
{
background-color: #BEBEBE;
}
</style>

Design page :
 <table>
<tr>
<td id="celebs">
Dhaval patel
</td>
</tr>
<tr>
<td>
<div id="div1">
hi<br />
hello!<br />
How Are you?
</div>
</td>
</tr>
</table>

COMMENT USING
PREMIUM SPONSORS
Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs