add transitions to a hide/show javascript dom -


i have function (and 3 more it)

function property (){  document.getelementbyid("property").style.display = "block";  document.getelementbyid("hotel").style.display = "none";  document.getelementbyid("other").style.display = "none";  document.getelementbyid("main").style.display = "none";  } 

how can add transition change of divs. function called on links.

now shows div clicked, , hides others. old div fade out , new fade in..

thanks

a popular way use jquery:

$('#property').fadein(); 

and that's it. page http://api.jquery.com/fadein/ has demo.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -