-
-
Save tompng/5152585 to your computer and use it in GitHub Desktop.
fadein,fadeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show(html){ | |
var target=$("#targetID"); | |
var old=target.children(); | |
var next=$("<div>"); | |
next.html(html); | |
next.css({position:'absolute',left:0,top:0,width:'100%',height:'100%',display:'none',background:'white'}) | |
target.append(next) | |
next.fadeIn(1000,function(){old.remove()}) | |
} | |
$('a').live('click',function(){ | |
var url=$(this).attr('href'); | |
$.get(url,function(val){ | |
show(val) | |
}) | |
return false; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment