Hi
This is my website i am creating. “http://theindiantelegram.com/” I would like to make the newsticker sticky while scrolling. I have tried lot of things but failed. Kindly advice
Hi,
The theme doesn’t have an option to make a specific blocks sticky. But a solution is to use do_shortcode function and place the Newsticker in the menu. For example if you use header style 1 – http://screencast.com/t/1DhmWTd8GK – http://screencast.com/t/G6ZyfzFQSn – http://screencast.com/t/1rwuAsuGMmE6
Of course enable sticky menu from Theme Panel > Header – http://screencast.com/t/6z8VxLneQe
Thanks!
Hi this works..thanks for looking into it..But i have another problem now
I had given a background colour and it now overlaps with the newsticker. I would really appreciate if you got any solution for that
Oh never mind…i solved it by adding some custom JS and CSS.
http://jsfiddle.net/livibetter/HV9HM/
This is really helpful if anyone else wants to make the newsticker sticky
Custom js
jQuery(document).ready(function($) {
function sticky_relocate() {
var window_top = $(window).scrollTop();
var div_top = $('#sticky-anchor').offset().top;
if (window_top > div_top) {
$('#sticky').addClass('stick');
} else {
$('#sticky').removeClass('stick');
}
}
$(function () {
$(window).scroll(sticky_relocate);
sticky_relocate();
console.log("hello");
})
});
Custom CSS:
#sticky.stick {
position: fixed;
top: 100px;
width: 860px;
}
Copy both stuff and place it in the themepanel. Add the following elements anywhere to echo the newsticker
<div id="sticky-anchor"></div>
<div id="sticky">
<?php echo do_shortcode('[td_block_trending_now]');?>
</div>