Hi guyz I’m trying to implement the InnerFade JQuery on my page but I’m a little bit confuse how to do it..
This is my code…
<!DOCTYPE html>
<html>
<head>
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.innerfade.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.js")" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(
function(){
$('#time').innerfade({
animationtype: 'slide',
speed: 750,
timeout: 2000,
type: 'random',
containerheight: '1em'
});
});
</script>
<body>
<div class="page">
<div id="header">
<br />
<div id="title">
</div>
<div id="menucontainer">
<ul id="menu">
</ul>
</div>
</div>
<div id="main">
@RenderBody()
</div>
<div id="footer">
</div>
</div>
</body>
</html>
(Problem): I dont know where to put the <ul id="time"> since I’m using a dynamic page.. please help me guyz.. thanks
Calling $(‘#time’).innerfade() in document.ready is going to try to trigger your fade immediately after the page loads, and if your #time element does not yet exist, which according to your html it does not, then nothing is going to happen.
If what you are trying to achieve is “insert the element dynamically and have it fade in instead of just ‘pop in'”,
First insert
<ul id="time" style="display:none">, then call $(‘#time’).innerfade().