Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.51 KB | None | 0 0
  1. $(function() {
  2.     $('#button-conf').on('click', function(){ // When the button has pressed
  3.         window.addEventListener("message", (event) => { // Verify a Json sended
  4.             if (event.data.type == "ui") { // Verify type of NUI
  5.                 $('#container').hide(); // Hide the #content - div had the all site
  6.                 $.post('http://nui/enviar', JSON.stringify({ // post with http://YOUR_RESOURCE_NAME/YOUR_EVENT_NAME
  7.                     type: "ui", // type of NUI
  8.                     display: false}) // Set display for false - hide him
  9.                 );
  10.             }
  11.         })
  12.     })
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement