-
For the most part I want my app to be pre-rendered as a static app. That is all working great, but I want one client-side function to work (swiping between pages). Is there a way to do that? It's just a few lines of javascript, can I just embed that and have SvelteKit ignore it? |
Beta Was this translation helpful? Give feedback.
Answered by
eecue
Mar 11, 2023
Replies: 1 comment
-
Ok I ended up figuring this out, you can just embed it in the body of the page, it just has to be inside of another tag: <main>
<script>
const element = document.querySelector('#main_photo');
....
</script>
</main> I could figure out how to use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
eecue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok I ended up figuring this out, you can just embed it in the body of the page, it just has to be inside of another tag:
I could figure out how to use
{variables}
within the code, but I was able to get the data I needed from the DOM