Wadah Madrasah Pengalaman: Tutorial Letak Nuffnang dalam keadaan Float dengan close button


Thursday, October 14, 2010

Tutorial Letak Nuffnang dalam keadaan Float dengan close button

.



S
alam korang.




So hari nie Wan nak wat Tutorial Nuff float..Nie permitaan dari Una..

Jom Tutorial

Bagi penguna template blogger and layout

Dashboard > Layout > Add A Gadget
klik HTML/Javascript. and korang copy paste kod kat bawah nie k.

(CTRL+C serentak untuk copy)


Bagi penguna template

Dashboard > Template


(CTRL+C serentak untuk copy)

------------------------


Kod bawah nie untuk Nuff Skyscraper

-------------------------------


<style type='text/css'>
#topbar{
position:absolute;
margin: 0px -23px;
padding: 0px;
width: 130px;
visibility: hidden;
z-index: 100;
}
</style>

<script type="text/javascript">

/***********************************************
* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopRight=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopRight()", 10);
}
ftlObj = ml("topbar");
stayTopRight();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>

<div id="topbar">
<a href="" onclick="closebar(); return false"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwW1Dx8kK5cCJTOOh1lDL9PZLvZWXWOVTxy5yYdyxqIzbTWs2vb_G1q1lPIzORBKNvEvUQGjVZx5k6Dbcsr0-NQ3Z6aZ2-k5YcoZjucpKzlb_OfUh6yyNiwFiK41hyphenhyphenELz4cYt7MkrlM4KX/s320/close.png" border="0" /></a>

Masukkan kod Nuff di sini

</div>

-----------------



Kod bawah nie untuk Leaderboard

-------------------------------


<style type='text/css'>
#topbar{
position:absolute;
margin: 400px -23px;
padding: 0px;
width: 730px;
visibility: hidden;
z-index: 100;
}
</style>

<script type="text/javascript">

/***********************************************
* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>

<div id="topbar">
<a href="" onclick="closebar(); return false"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwW1Dx8kK5cCJTOOh1lDL9PZLvZWXWOVTxy5yYdyxqIzbTWs2vb_G1q1lPIzORBKNvEvUQGjVZx5k6Dbcsr0-NQ3Z6aZ2-k5YcoZjucpKzlb_OfUh6yyNiwFiK41hyphenhyphenELz4cYt7MkrlM4KX/s320/close.png" border="0" />Close</a>

Masukkan kod Nuff di sini

</div>

---------------



Ok

Tu je.



.



37 comments:

una ahmad said...

tengs ya wan

Wan_hazel said...

nur husna

welkam...ehehhe

AngahSayang2314 said...

thanks dapt gak info

Tengku Puteri said...

wan...frhah buat x jadi...huhuh..

Wan_hazel said...

Farhah Zaidah

erk nape tak jadi??

.ima. said...

thenx :)

Wan_hazel said...

welkam....

Capiy@h said...

nak say tq lg sbb dpt buat yg nuffnang nie pulak... lg 1, nak tnya wan hazel blajaq kat mna hah semua2 nie ??? bestt la...

Wan_hazel said...

Capiy@h

wan godek2 je..lepas tu try wat kod n then jadilah..ehehhe

Capiy@h said...

wan hazel

hah??godek2??godek2 pn jadi kira ok la..jelez2..heee~~

Wan_hazel said...

Capiy@h

a ah..law nak cari kat google pun ade gak..p ade yg tak ssuai ngn blohg wan..so kene lah godek2 sendri..ehehhe..try and error

Rara Farah said...

huhu..xjd..aritu jd..waaaaaaa

ingt nk ltk sume...leaderboard ngn between post tuh...tp xjd...skrg hnye ade skycrapper jew...

Wan_hazel said...

Rara Farah

ahahha..nape lak tak jadi lagi??

Bee said...

tak jadi huhu

Wan_hazel said...

honeyvsbee..

erk nape tak jadi??ehhee

eqa said...

mle2 1st jdi lpas 2 xjd da..npe ek?hurmmm..

Wan_hazel said...

eqa

erk..nape lak tak jadi??

Anonymous said...

xjadi pun... TT^TT

Unknown said...

wan... cmna wat iklan ni float kat sblh kri??? :P

Wan_hazel said...

anon..

wat betul2 k..yg lain boleh je

Wan_hazel said...

Diary oF Mine


law yg tu wna tak pasti lak...dah lama tak tengok2 kod nie...

Habibah said...

wan..knp ek bila sy scroll down blog sy, nuffnang tu jadi jatuh2 and macam main nyorok2 kat bawah window ? nak godek2 code tu, tak reti..hehe..

Wan_hazel said...

try ubah kod nie k..

< style type='text/css' >
#topbar {
position:absolute;
margin: 0px -23px;

-23 tu ubah mana2 nombor..try n error leh tak??

saffa hamzah said...

salam.. nak mintak tolong boleh?
mcm mana nak buat status kita float mcm nuffnang..siap ada close button lagi.. saya dah try buat guna tutorial blog orang lain tapi x jadi.. mungkin wan boleh tolong? terima kasih

Wan_hazel said...

status tu status ape erk??

saffa hamzah said...

mcm nuffnang wan yg float tu tapi boleh letak perkataan contohnya kita nak isi status kita yg dalam keadaan float..

Wan_hazel said...

yg wan nak taw..status tu status Twitter ke???ganti masuk je dalam float nuff tu..mesti boleh..

Erfan said...

kod nuff na amik kat mne eak?

Wan_hazel said...

aik..kod nuff nak ambik kat mana??/kat acc nuff...sign up nuffnang.com k..

budakkuat said...

thax wan .. =D

Wan_hazel said...

welkam

Ikablabla said...

dah jadilah :D

Wan_hazel said...

hehehe..gud2..

Alyra said...

wan, saya copy tutorial ni. Saya dah letak credit ^^

iela_dekla said...

nk cri kod nuff tu kt mna???sya bdak bru blajar....tq..

Wan_hazel said...

dekat acc nuffnang awak

izwan said...

macam ni ker..huhu