Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function()
- {
- window.addEventListener('message', function(event)
- {
- if(event.data.type == "ATMSwitch")
- {
- $('#ATMWindow').css('display', event.data.enable ? 'block' : 'none');
- $('#balance').empty();
- $('#balance').append('Balance: $' + event.data.balance);
- }
- })
- $(window).keydown(function(e)
- {
- if(e.which == 8 || e.which == 27)
- {
- $.post('http://atm/close', JSON.stringify({}));
- }
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement