| @@ -70,6 +70,23 @@ | ||
| 70 | 70 | console.log( 'AJAX request failed: ' + error ); |
| 71 | 71 | } |
| 72 | 72 | } ) |
| 73 | 73 | } ) |
| 74 | + | |
| 75 | + $( ".hsr-promotional-banner .hsr-buttons .close-btn" ).click( function () { | |
| 76 | + $.ajax( { | |
| 77 | + type: 'post', | |
| 78 | + url: hostingerContainer.url, | |
| 79 | + data: { | |
| 80 | + action: 'hostinger_hide_promotional_banner', | |
| 81 | + nonce: hostingerContainer.nonce, | |
| 82 | + }, | |
| 83 | + success: function () { | |
| 84 | + $('.hsr-banner-container').hide(); | |
| 85 | + }, | |
| 86 | + error: function ( xhr, status, error ) { | |
| 87 | + console.log( 'AJAX request failed: ' + error ); | |
| 88 | + } | |
| 89 | + } ) | |
| 90 | + } ); | |
| 74 | 91 | } ); |
| 75 | 92 | } )( jQuery ); |