By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

revealTrans filter ineffective

P: 3
Expected behavior: Clicking a button dissolves an image (actually dissolves a SPANed region on the page in which an image is displayed). Clicking the button again reverses the effect.
Thanks for any help on this, or maybe another way to accomplish the desired effect of dissolving an image onto or off of a page.

By the way, filters only work in IE (4+), so don't bother trying it in any other browsers.
Expand|Select|Wrap|Line Numbers
  1. <body>
  2. <SCRIPT LANGUAGE="javascript">   
  3. function go() {
  4. Gigg.filters[0].Apply();
  5.  
  6. if (Gigg.style.visibility == "visible")
  7. {
  8. Gigg.style.visibility = "hidden";
  9. Gigg.filters.revealTrans.transition=12;    
  10. }
  11. else
  12. {
  13. Gigg.style.visibility = "visible";
  14. Gigg.filters[0].transition=12;
  15. }
  16. Gigg.filters[0].Play();
  17. }
  18. </SCRIPT> 
  19.         <INPUT onclick=go(); type=button value="Do function!">
  20.         <SPAN 
  21.             id=Gigg 
  22.             style="FILTER: revealTrans(duration=2); 
  23.                     VISIBILITY: visible; 
  24.                     WIDTH: 155px; HEIGHT: 198px"> 
  25.             <IMG src="my155x198.jpg">
  26.         </SPAN> 
  27. </body>
  28.  
Jan 10 '08 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
Are you sure it doesn't work? It seems to work fine in IE7.
Jan 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.