Transfer var from a href to a JS/JQUERY Code
Hi everbody,
the code should fadein a div when the page is ready, and when you change the site with an link the div should fadeout.
But how can i transfer the var "url (for example index.html) to the JS
(sorry for my bad english, I hope you can understand me:))
the code:
-
<script type="text/javascript">
$(document).ready(function(){
$("div#content").fadeOut(0);
$("div#content").fadeIn(1500);
$("img").click(function () {
$("div#content").fadeOut(1500,function quit(url)
{
window.setTimeout(function () { document.location.href = url; }, 2000);
});........................................................................................^
});..............._____________________________________|
...................|
});............|
..................| (this is an arrow :) )
</script>....|
..................|
<a href="the url"><img src="img/navi/home.gif" width="34" height="14" /></a>