Sunday, March 31, 2013

Tutorial - Click Then Slide

  • Add Gadget > HTML/Javascript
  • Copy dan paste dalam HTML/Javascript

< <!doctype html>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideToggle("slow");
  });
});
</script>

<style type="text/css">
#panel,#flip
{
padding:0px;
text-align:center;
background: url(BACKGROUND URL) repeat;
border: 1px solid #7DD4FF;
border-radius: 5px;
}
#panel
{
padding:0px;
display:none;
border: none;
}
</style>
<div id="flip">AYAT BUTTON</div>
<div id="panel”> WIDGET KORANG</div>

  • Edit code tu apa yang patut
  • Preview, kalau dah berjaya save sambil buat harlem shake :P
Thanks : CSS Hover Selector

No comments: