PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
JS: Bereich langsam ein/ausblenden
Beitrag
<blockquote data-quote="martinhahn90" data-source="post: 963744" data-attributes="member: 206765"><p>Servus =),</p><p></p><p>ich habe es mir zur Aufgabe gemacht, einen DIV-Bereich grundsätzlich sichtbar zu haben, bei einem Mouseout langsam auszublenden und bei einem erneuten Mouseover langsam einblenden zu lassen.</p><p></p><p>Nundenn, das ausblenden klappt schon wunderbar, dafür habe ich eine Funktion. Jedoch schaffe ich es einfach nicht, diese Funktion umzukehren, sodass der DIV sichtbar ist und (wenn sie gerade durch ein Mouseout ausgeblendet wurde) langsam wieder sichtbar wird.</p><p></p><p>Hier einmal der Link zu der Datei:</p><p></p><p></p><p>PS: Blend ist die Ausblendfunktion, Blendin sollte die Einblendfunktion sein...</p><p></p><p>[code]</p><p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> </p><p><html xmlns="http://www.w3.org/1999/xhtml]http://www.w3.org/1999/xhtml"> </p><p><head> </p><p><title>Blendeffekt Test</title> </p><p><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </p><p><script language="javascript" type="text/javascript"> </p><p>function blend ( obj, percent ) { </p><p>if( typeof percent == "undefined" ) { </p><p> percent = 100; </p><p> } </p><p> percent -= 5; </p><p> if( percent >= 0 ) { </p><p> obj.style.opacity = percent/100; </p><p> obj.style.filter = "Alpha(opacity="+percent+")";</p><p> } </p><p> if( percent > -100 ) { </p><p> window.setTimeout(function() { blend( obj ,percent ); }, 50 ); </p><p> } </p><p>}</p><p>function blendin ( obj, percent ) { </p><p>if( typeof percent == "undefined" ) { </p><p> percent = 0; </p><p> } </p><p> percent += 5; </p><p> if( percent == 100 ) { </p><p> obj.style.opacity = percent -= 5; </p><p> obj.style.filter = "Alpha(opacity="+percent+")";</p><p> } </p><p> if( percent > -100 ) { </p><p> window.setTimeout(function() { blend( obj ,percent ); }, 50 ); </p><p> } </p><p>}</p><p></p><p></p><p></script> </p><p></head> </p><p></p><p><body> </p><p></p><p><div style="height: 100px; background-color: #00f; text-align: center;padding-top: 50px;" onmouseout="blend(this);" onmouseover="blendin(this);"></div> </p><p></p><p></body> </p><p></p><p></html></p><p>[/code]Grüße und Danke im Voraus,</p><p></p><p>Martin</p></blockquote><p></p>
[QUOTE="martinhahn90, post: 963744, member: 206765"] Servus =), ich habe es mir zur Aufgabe gemacht, einen DIV-Bereich grundsätzlich sichtbar zu haben, bei einem Mouseout langsam auszublenden und bei einem erneuten Mouseover langsam einblenden zu lassen. Nundenn, das ausblenden klappt schon wunderbar, dafür habe ich eine Funktion. Jedoch schaffe ich es einfach nicht, diese Funktion umzukehren, sodass der DIV sichtbar ist und (wenn sie gerade durch ein Mouseout ausgeblendet wurde) langsam wieder sichtbar wird. Hier einmal der Link zu der Datei: PS: Blend ist die Ausblendfunktion, Blendin sollte die Einblendfunktion sein... [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml]http://www.w3.org/1999/xhtml"> <head> <title>Blendeffekt Test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language="javascript" type="text/javascript"> function blend ( obj, percent ) { if( typeof percent == "undefined" ) { percent = 100; } percent -= 5; if( percent >= 0 ) { obj.style.opacity = percent/100; obj.style.filter = "Alpha(opacity="+percent+")"; } if( percent > -100 ) { window.setTimeout(function() { blend( obj ,percent ); }, 50 ); } } function blendin ( obj, percent ) { if( typeof percent == "undefined" ) { percent = 0; } percent += 5; if( percent == 100 ) { obj.style.opacity = percent -= 5; obj.style.filter = "Alpha(opacity="+percent+")"; } if( percent > -100 ) { window.setTimeout(function() { blend( obj ,percent ); }, 50 ); } } </script> </head> <body> <div style="height: 100px; background-color: #00f; text-align: center;padding-top: 50px;" onmouseout="blend(this);" onmouseover="blendin(this);"></div> </body> </html> [/code]Grüße und Danke im Voraus, Martin [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ★ = 12, ◇ = 4 und die Hälfte von ★ zu ◇ addiert wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
JS: Bereich langsam ein/ausblenden
Oben