I want to check if an element is visible and if yes, I want to scroll down to it. I am trying to achieve that with the following jquery:
var j = jQuery.noConflict();
jQuery(document).ready(function($) {
if(j('#element').css('display') == 'block'){
j('body').scrollTo('#target');
};
});
but it does not work.