30 January 2012

Tutorial Floating Javascript Promoter

Assalamualaikum w.b.t,

Hari ni nak buat tutorial berkenaan objek/gadget yang ada dalam blog aku ni ...

Sebenarnya, korang boleh letak apa2 je dalam ruangan tu, selain Facebook Page Plugins, Iklan Nuffnang, Churp2, anything...

Ok Jom mula Tutorial..

1. Buka Dashboard > Design > Add a New Gadget > HTML/Javascript
2.Masukkan kod-kod dibawah dalam ruangan HTML Java Script tu...

<style type="text/css">#hb{position:fixed;top:300px;right:300px;}* html #hb{position:relative;}
.hbcontent{float:right;border:6px dashed #A5BD51;background:#ffffff;padding:10px;scrolling:yes;}</style>
<script type="text/javascript">function showHideHB(){var hb = document.getElementById("hb");var w = hb.offsetWidth;hb.opened ? moveHB(0, 30-w) : moveHB(20-w, 0);hb.opened = !hb.opened;}function moveHB(x0, xf){var hb = document.getElementById("hb");var dx = Math.abs(x0-xf) > 10 ? 5 : 1;var dir = xf>x0 ? 1 : -1;var x = x0 + dx * dir;hb.style.top = x.toString() + "px";if(x0!=xf){setTimeout("moveHB("+x+", "+xf+")", 10);}}</script>
<div id="hb">
<div class="hbtab" onclick="showHideHB()"> </div>
<div class="hbcontent">
<div style="text-align:right"><a href="javascript:showHideHB()">.:[CLOSE ME]:.</a></div><center>
MASUKKAN KOD GADGET JavaScript korang disini
   
</center>
<script type="text/javascript">var hb = document.getElementById("hb");hb.style.center = (30-hb.offsetWidth).toString() + "px";</script></div></div>

Kod warna kuning = jarak gadget korg dari atas
Kod warna biru = jarak gadget korang dari kiri

Kod warna oren = warna border gadget.
Kod warna hijau = warna background gadget

Dapatkan kod warna di [SINI]

Gantikan tulisan warna merah dengan kod apa2 gadget yang korang nak.. contoh
[Facebook Social Plugins] ....
Mesej..
kod shoutbox...
Followers..
and others..

Ok, Selamat Mencuba :) Bye

Syukran 'ala kulli haal. From your friend, moha_mohu

0 ,581 mengulas:

Post a Comment