Full version: jsB@nk » Snippet » Stretch filter
URL: https://www.javascriptbank.com/stretch-filter.html
Simple IE 5+ Stretch filter.
Full version: jsB@nk » Snippet » Stretch filter
URL: https://www.javascriptbank.com/stretch-filter.html
<SCRIPT>// author: Igor Bushinvar arrStretchStyles = new Array();arrStretchStyles = ['HIDE','PUSH','SPIN'];var iIndexCount = 0;var bToggle = 0;function fnToggle() {var iStyleIndex = iIndexCount%3 ; // MOD function avoids resetting the counter. fildiv.filters[0].stretchstyle = arrStretchStyles[iStyleIndex]; Button.value = 'Click to play filter for StretchStyle = "' + arrStretchStyles[iStyleIndex] + '"'; fildiv.filters[0].Apply(); if (bToggle) { bToggle = 0; fildiv.style.backgroundColor="gold"; } else { bToggle = 1; fildiv.style.backgroundColor="green"; } fildiv.filters[0].Play(); iIndexCount += 1;}</SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<P><INPUT onclick=fnToggle() type=button value='Click to play filter for StretchStyle = "HIDE"' name=Button></P><!-- This DIV is the target of the transition. --><DIV id=fildiv style="FILTER: progid:DXImageTransform.Microsoft.Stretch(duration=3); WIDTH: 250px; HEIGHT: 250px; BACKGROUND-COLOR: gold"></DIV><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->