I have function that search for company, and I use ajax to do this search. When success the ajax()
function, I need to move scroll to div, I try this:
success: function(data){
$(".insid_body_web").html(data);
$(window).scrollTop($('#insid_body_web').offset().top);
$("#ResultCompany1").show();
$("#ResultCompany2").show();
$("#ErrorSearch").hide();
},
But this move scroll bad effect, I need move with good effect by FadeIn()
function or other way.
FadeIn is used for removing something. As far as i guess, what you need is the smooth scrolling to the top. If it is then let me know, I will put the code.
success: function(data){
$(".insid_body_web").html(data);
$('html, body').animate({scrollTop:$('#insid_body_web').offset().top}, 'slow');
$("#ResultCompany1").show();
$("#ResultCompany2").show();
$("#ErrorSearch").hide();
},