Jquery and JS are not visible from a partial

I have a partial in a page and there in the partial I have an input field and the result output div:

<input type="number" id="paidAmount">
<div id="result"></div>

Those work in the parent page, but input data is not transfered from inside the partial to the Jquery calculation script. Meanwhile result div works fine. How to transfer input data from the partial to the js script loacted in /static/plugins?

Showing your code might get you more useful answers.

Please take a look.
I can not access the data in this field even if I add this code into my js:

document.addEventListener("DOMContentLoaded", function() {
  const inputField = document.getElementById("paidAmount");

How does posting a line of JavaScript code help to understand what you’re doing and what is (not) working? Post a link to your repository

1 Like