Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
Javascript onmouseover....... text glow

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
Tomz



Joined: 19 Dec 2004
Posts: 66
Location: Osijek

PostPosted: 12.01.2006 15:42    Post subject: Javascript onmouseover....... text glow Add user to your forum ignore list Reply with quote

Napravio sam text glow effect u javascriptu ali ne shvačam kako se samo prikazuje na jednom textu i to na Test 1. Kako izvesti da se samo pokazuje na određenom kada je mouseover?

evo primjera: http://thebort.net/kristo/Test/Test.html
Back to top
View user's profile Send private message Send e-mail
tubak



Joined: 14 Mar 2005
Posts: 133
Location: Istra

PostPosted: 12.01.2006 16:38    Post subject: Add user to your forum ignore list Reply with quote

Code:

<script type="text/javascript">
var el;
var a = true;
var b = 127;
var time;
var time2;

function imediva(elId) {
if (document.getElementById) {el=document.getElementById(elId)}
if (document.all) {el=eval("document.all." + elId)}
if (el == undefined) return;
}


function startglow(elId)
{

if(a == true) {b+=4;}
if(b == 255) {b-=4; a = false;}
if(b==127) {b+=4; a = true;}
if(a == false) {b-=4;}

imediva(elId);

el.style.color="rgb("+ b +","+ b +"," + b + ")";
time = setTimeout ("startglow('" + elId + "')",16);
clearTimeout(time2);
}

function stopglow(elId) {
if (b > 127) {b-=4;}

imediva(elId);

el.style.color="rgb("+ b +","+ b +"," + b + ")";
time2 = setTimeout ("stopglow('" + elId + "')",16);
clearTimeout(time);
}
</script>
</head>

<body bgColor = "#023146" text="#7F7F7F">
<div id="glow1" onmouseover="startglow('glow1')" onmouseout="stopglow('glow1')"><b>TEST 1</b></div> <br> <br>
<div id="glow2" onmouseover="startglow('glow2')" onmouseout="stopglow('glow2')"><b>TEST 2</b></div> <br> <br>
<div id="glow3" onmouseover="startglow('glow3')" onmouseout="stopglow('glow3')"><b>TEST 3</b></div>


Pukneš ovu Javascript funkciju u header i dalje samo pazis kako dajes ime div tagu, tj. ID parametar. I to ime upises i u onmouseover funkciju(ime) i onmouseout funkciju(ime).

P.S.
Ovaj ti kod i nije neka sreca, prevelika, jer ako brzo bjezis s misem preko linkova, neki linkovi ostanu u nekoj svijetlijoj boji nego sto bi trebali jer se ne stignu restorat.
Trebalo bi jos malo doraditi funkciju.
Back to top
View user's profile Send private message Visit poster's website
Tomz



Joined: 19 Dec 2004
Posts: 66
Location: Osijek

PostPosted: 12.01.2006 16:48    Post subject: Add user to your forum ignore list Reply with quote

Puno hvala! pokušat ću doraditi. Very Happy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group