Category : modal-dialog

In a page in my react project I have a function that triggers a useState, which holds a boolean responsible for showing or not a modal that overlaps the same page. const [modalOpened, setModalOpened] = useState(false); And this is the function responsible for handling the state change: const handleImageClick = () => { setModalOpened(!modalOpened); }; ..

Read more

enter image description here How to make div with ID or other element unique? if i click charge in different user , the data modal is different too. opened modal : if (action === ‘set_fine’) { let id = datas; $(‘#modalcharge’).show(); console.log("chargefine opened!") $(‘#fine_categori’).html(""); $(‘#fine_categori1’).html(""); $(‘#fine_categori2’).html(""); for (i = 0; i < fine.length; i++) { ..

Read more

I have a banner (which should be closed when clicked on ok), and it contains a button to open a modal box. When I click the button for modal, part of the banner disappears. How can I avoid this? Thanks $(document).ready(function(){ if (window.localStorage.getItem(‘accept_cookies’)) { $(“button”).parent().parent().closest(‘div’).hide(); } $(“button”).click(function() { window.localStorage.setItem(‘accept_cookies’, true); $(this).parent().parent().closest(‘div’).hide(); }); }); // Get ..

Read more

I have button on the screen which opens an Modal when it is clicked. Now when the modal opens, i want the content inside the modal draggable (with drag and drop API) to the normal window. Need Help. index.html <html> <head> <link rel="stylesheet" href="./style.css"> </head> <body> <div class="main"> <button id="show-modal">Show Modal</button> <div id="my-modal" class="modal"> <div ..

Read more