'내가만든 함수/js(Web)'에 해당되는 글 1건

target에 맞는 id 혹은 class 등 넣어주기 스트링 넣어주기 !!! 

function TopHeightObject(target){
  var TopHeightObjectList = []
  $(target).each(function(){
    console.log($(this).offset().top);
    TopHeightObjectList.push($(this));
  })
  return TopHeightObjectList
}
$(document).ready(()=>{
  var TopHeightList = TopHeightObject('body section')
  console.log(TopHeightList)
  
})

블로그 이미지

Or71nH

,