Download Netflix-Clone/src/Utils/GridScrollArrows.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Utils/GridScrollArrows.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Utils/GridScrollArrows.js
-
curl -L -o GridScrollArrows.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/Netflix-Clone/src/Utils/GridScrollArrows.js
518 Bytes
| import $ from "jquery"; | |
| export const LeftGridArrow = node => { | |
| var move = node.current; | |
| var width = window.innerWidth; | |
| var pixelWidth = width + "px"; | |
| console.log(pixelWidth); | |
| $(move).animate( | |
| { | |
| scrollLeft: "-=" + pixelWidth | |
| }, | |
| "slow" | |
| ); | |
| }; | |
| export const RightGridArrow = node => { | |
| var move = node.current; | |
| var width = window.innerWidth; | |
| var pixelWidth = width + "px"; | |
| $(move).animate( | |
| { | |
| scrollLeft: "+=" + pixelWidth | |
| }, | |
| "slow" | |
| ); | |
| }; | |