Saturday, August 10, 2013

How can i show a div using jquery

<script type="text/javascript">
$(function(){
$('.mycheck').change(function () {
    if ($(this).attr("checked"))
    {
        $('.mychkdiv').fadeIn(100);
        return;
    }
   $('.mychkdiv').fadeOut();
});

});
</script>
<style>
.mychkdiv { width:400px; padding:20px; background-color:yellow; display:none;}
</style>
 </head>

 <body>
hello this is checkbox  <input type="checkbox" class="mycheck" name="chk"/>
<div class="mychkdiv" style="display:none">sfdadasds</div>

No comments:

Post a Comment

What is scope in Angular Js

Angular Js Scope The scope is the binding part between the HTML (view) and the JavaScript (controller). The scope is an object with th...