Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- $('#button-conf').on('click', function(){ // When the button has pressed
- window.addEventListener("message", (event) => { // Verify a Json sended
- if (event.data.type == "ui") { // Verify type of NUI
- $('#container').hide(); // Hide the #content - div had the all site
- $.post('http://nui/enviar', JSON.stringify({ // post with http://YOUR_RESOURCE_NAME/YOUR_EVENT_NAME
- type: "ui", // type of NUI
- display: false}) // Set display for false - hide him
- );
- }
- })
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement