Cross-window stuff - sender

by Somrlik

HTML

<input type="text" class="whatIEnter">
<a href="#" data-req="show">Show/hide something on the other monitor</a>

JavaScript

jQuery(document).ready(function($) {

	// sender

	$('.whatIEnter').keyup(function() {
    	localStorage.setItem("foo", $('.whatIEnter').val());
    });
    
    $('a[data-req]').click(function() {
    	localStorage.setItem($(this).data('req'), Date.now());
    });
    
});