728x90 반응형 Scroll3 react로 GA(google Analytics) mobile tracker 만들기 import { useEffect, useRef, useState } from "react"; import { useTracker } from "./util/Tracker"; export const Mobile = () => { const tracker = useTracker(); const [foldState, setFoldState] = useState(false); const ref = useRef(null); const [isTracked, setIsTracked] = useState(false); useEffect(() => { const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { // 요소가 .. 2024. 1. 30. 모바일 레이어 팝업 띄울때 스크롤 막기 레이어 띄울때$("body").bind('touchmove', function(e){e.preventDefault()}); 레이어 닫을때 $("body").unbind('touchmove'); 위와 같이 사용하면 된다. 2016. 2. 3. jquery로 만든... 간단한 떠다니는 배너 $(document).ready(function(){ var currentPosition = parseInt($("#mscroll").css("top")); $(window).scroll(function() { var position = $(window).scrollTop(); $("#mscroll").stop().animate({"top":position+currentPosition+"px"},1000); }); });#mscroll{width:60px;height:200px;position: absolute;left:430px;z-index:1000;top:-300px;} 2010. 10. 15. 이전 1 다음 728x90 반응형