Saturday, February 15, 2014

How Change CSS PRoperty of DIV Using JQUERY on Window Load

<html>
<style>
/* Innitial Property Of a div*/
.property{
font-size:40px;
color:red;
}
/* apply these Class when window Load*/
.newclass{
font-size:20px;
color:green;
}
</style>

<script src="jquery.js">
</script>
<script>
$(document).ready(function(){

/*
on window loading time change the property of div
*/
$("#blogger").addClass('newclass');


});

</script>
<body>
<div id="blogger" class="property">
my nam Is sandeep soni
</div>
</body>
</html>

100% working code or you try yourself to change id of div

the Jquery Packgae Download From jquery.com
 save in same Folder Where Your web pages Saved