Advertisement
nicolas-chuet

scriptok.js

Mar 27th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. //declaration de JQUERY en javascript, pas le choix
  2. const scriptJquery = document.createElement("script");
  3. scriptJquery.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js");
  4. document.head.appendChild(scriptJquery);
  5. //une fois le Jquery chargΓ©, on ajoute le reste en JQUERY
  6. scriptJquery.onload = function() {
  7. $.get('http://modal.local/modal.php',
  8. function(data){$('body').append(data);}
  9. );
  10. $(document).ready(function() { setTimeout(openModal,1000) });
  11. };
  12. function openModal(){
  13. $('#exampleModalCenter').modal('toggle')
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement