I am trying to perform some action on some point when user scrolls window. Basically i am using some social networking button on my website when user see article of my website i am showing some tweet and like button on left side of article and when user scroll window down then my tweet and like position is fixed so its stick on there position.
But the problem is when user scroll window down my tweet and like button collides with comment box.so how can i stop from colliding.
My code is :
$(document).ready(function(){
alert($(".comment-content").offset().top);
$(window).scroll(function () {
if($(window).scrollTop()=="1260"){
// want to change position of tweet and like button to relative; ( position:relative)
}
});
});
Please help me. Thanks.