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="cebito" data-source="post: 964895" data-attributes="member: 173078"><p><strong>AW: JS: Bereich langsam ein/ausblenden</strong></p><p></p><p>Erstens ruft dein Timer beim Einblenden die falsche Function auf, mit noch ein paar kleinen Änderungen gehts dann. Brauchst noch eine Abfrage ob's schon zu sehen ist (für erstes mouseover)...</p><p></p><p>[code]<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/100; </p><p> obj.style.filter = "Alpha(opacity="+percent+")";</p><p> } </p><p> if( percent < 100 ) { </p><p> window.setTimeout(function() { blendin( obj ,percent ); }, 50 ); </p><p> } </p><p>}[/code]</p><p></p><p>Edit: Kleine Info, funzt auch in IE6..... <img src="/styles/default/xenforo/smilies/zwinker.gif" class="smilie" loading="lazy" alt=";)" title="Wink ;)" data-shortname=";)" /></p></blockquote><p></p>
[QUOTE="cebito, post: 964895, member: 173078"] [b]AW: JS: Bereich langsam ein/ausblenden[/b] Erstens ruft dein Timer beim Einblenden die falsche Function auf, mit noch ein paar kleinen Änderungen gehts dann. Brauchst noch eine Abfrage ob's schon zu sehen ist (für erstes mouseover)... [code]<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/100; obj.style.filter = "Alpha(opacity="+percent+")"; } if( percent < 100 ) { window.setTimeout(function() { blendin( obj ,percent ); }, 50 ); } }[/code] Edit: Kleine Info, funzt auch in IE6..... ;) [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 7, ▼ = 3, ◇ = 2 und die Summe von ▲ und ▼ durch ◇ geteilt wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
JS: Bereich langsam ein/ausblenden
Oben