I created this news ticker: http://jsfiddle.net/riffaz/92s92k1d/ and it's working fine in fiddle.
I am trying to add this ticker to the site. For that I put this code on a PHP widget
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$author_id=$post->post_author;
$args = array('cat'=> 7, 'posts_per_page' => 5, 'paged' => $paged, 'orderby' => date, 'order' => ASC );
query_posts( $args);?>
<ul class="list-6 ticker" style="height: 82px;">
<?PHP while (have_posts()) : the_post();?>
<li>
<h5>
<a class="upcomnig" href="<?php the_permalink() ?>" title="<?php the_title();?>">
<?php echo get_upcoming_date();?>
<span style="font-size:16px; color: #fe5e08"><?PHP echo get_upcoming_title(); ?></span>
</a>
</h5>
</li>
<?php endwhile;?>
</ul>
I put this line into child theme style.php
.ticker {
height: 75px;
overflow: hidden;
}
Then on child theme footer.php : I put following code(right above the tag):
function tick(){
$('.ticker li:first').slideUp( function () { $(this).appendTo($('.ticker')).slideDown(); });
}
setInterval(function(){ tick () }, 5000);
It does nothing on my home page. It stays where they are on the home page. But if I go to any pages it's working fine. weird. Any ideas how to fix this?
http://www.ldjf.org/ look at the bottom right area.. Footer area upcoming events