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>

post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.