Search
 
SCRIPT & CODE EXAMPLE
 

HTML

modal show using js

 $('#ViewProfileModal').modal('show');
Comment

modal javascript example

<button class="trigger">Click here to trigger the modal!</button>
<div class="modal">
    <div class="modal-content">
        <span class="close-button">&times;</span>
        <h1>Hello, I am a modal!</h1>
    </div>
</div>
Comment

javascript custom modal

Swal.fire({
  icon: 'error',
  title: 'Oops...',
  text: 'Something went wrong!',
  footer: '<a href="">Why do I have this issue?</a>'
})

this is javascript cdn put this code in your html body section ending the body section 
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
Comment

how to create modal popup in javascript

<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
  Swal.fire(
  'Good job!',
  'You clicked the button!',
  'success'
)
</script>
Comment

modal javascript

const modalGallery = (id) => {
    let modal = $('#modal-gallery-before-after');
    let popup = modal.querySelector('.popup');
    let compare__item = $(`.compare__item-${id}`);
    let popupWrap = modal.querySelector(".popup__wrap");
    let popupItems = modal.querySelector(".popup__item");
    let modal_gallery_item = $(".modal-gallery-item");
    let item__image = compare__item.querySelector('.modal-image').innerHTML;
    let item__title = compare__item.querySelector('.modal-title').innerHTML;
    let modalItem = `<div id="modal__item-${id}" class="modal__item">
    <div class="modal__image">${item__image}</div>
    <div class="modal__title">${item__title}</div>
    </div>`;
    popupItems.setAttribute('data-popup', `${id}`);
    modal_gallery_item.innerHTML = modalItem;
    popup.style.display = "block !important";
    $(`.popup__item[data-popup="${id}"]`).classList.add("show_data");
    popupWrap.classList = `popup__wrap popup__wrap--${id}`;
    setTimeout(() => {
        popup.classList.add("show_data");
    }, 10);
}

const closeModal = () => {
   let modal = $('#modal-gallery-before-after');
   let popup = modal.querySelector('.popup');
   let popupWrap = modal.querySelector(".popup__wrap");
   popup.classList.remove("show_data");
   setTimeout(() => {
    popup.style.display = "";
    popupWrap.classList = `popup__wrap`;
}, 500);
}
Comment

PREVIOUS NEXT
Code Example
Html :: default php version ubuntu 20.04 
Html :: how to make a sign up page in html 
Html :: how to do comment in html 
Html :: double range slider html 
Html :: run html 
Html :: . and # in html 
Html :: regex cheat sheet 
Html :: html two classes in one element 
Html :: heading in html 
Html :: 503 service unavailable error 
Html :: embedmd 
Html :: how can we change background in loop img in webpages 
Html :: skiing in winter 
Html :: how to link an javascrit to an html fle grepper 
Html :: how to create a currency select options on a html website 
Html :: tt in html 
Html :: table con html 
Html :: Title Tag Length Checker 
Html :: display string on anchor tag onclick display image in new window html 
Html :: kjsdahflkahsdkljfhlakjhsldkjfhjkdskslakjsdhflkjahsdlkfjhjahlksjdhflkjshfjkshakdjshfksjdhjkfsakdhfjkhsadlkjf 
Html :: customer details pay button code 
Html :: what is class attribute in form 
Html :: close button 
Html :: html header 
Html :: kodingan mencatumkan keterangan gambar header html 
Html :: how to make my html website resize a iphone 
Html :: how to make password in html correct or incorrect 
Html :: /etc/ 
Html :: app script send data back to html 
Html :: how to insert a tag into a tag vscode 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =