lab/static/js/lab.js
function bindToggles() {
  // Watch for changes on the checkboxes in the device dropdown
  var iphone = $('#device-iphone');
  var android = $('#device-android');
  var windows = $('#device-windows');

  var devices = [iphone, android, windows];
  for(var i in devices) {
    devices[i].addEventListener('change', function(e) {
      var device = this.name;
      console.log('Device changed', device, this.checked);

      showDevice(device, this.checked);
      saveLastDevices(device, this.checked);
    });
  }
}
function bindToggles() {
  // Watch for changes on the checkboxes in the device dropdown
  var iphone = $('#device-iphone');
  var android = $('#device-android');
  var windows = $('#device-windows');

  var devices = [iphone, android, windows];
  for(var i in devices) {
    devices[i].addEventListener('change', function(e) {
      var device = this.name;
      console.log('Device changed', device, this.checked);

      showDevice(device, this.checked);
      saveLastDevices(device, this.checked);
    });
  }
}
function bindToggles ( ) { // Watch for changes on the checkboxes in the device dropdown var iphone = $ ( '#device-iphone' ) ; var android = $ ( '#device-android' ) ; var windows = $ ( '#device-windows' ) ; var devices = [ iphone , android , windows ] ; for ( var i in devices ) { devices [ i ] . addEventListener ( 'change' , function ( e ) { var device = this . name ; console . log ( 'Device changed' , device , this . checked ) ; showDevice ( device , this . checked ) ; saveLastDevices ( device , this . checked ) ; } ) ; } }
Bind the dropdown platform toggles
Bind the dropdown platform toggles