<style type="text/css"> .style1 { height:30px; color:#fff; } </style> <script> $(document).ready(function(){ $("#btn1").click(function() { $('.panel').fadeOut() ; return false; }); }); </script> <div id="btn1"> Button</div> <div class="panel">Text_Text_Text</div>
$('.panel').addClass('style1') ;
$('.panel').attr('id','style1') ;
<div id="btn1"> Button</div> <div id="btn1"> Button2</div>