Skip to content

Instantly share code, notes, and snippets.

@SethWilson
Last active December 21, 2015 02:18
Show Gist options
  • Save SethWilson/6233829 to your computer and use it in GitHub Desktop.
Save SethWilson/6233829 to your computer and use it in GitHub Desktop.
/**
* CTCCartFillout.js
*
* This little bookmarklet populates the new app builder with default values
*
* MIT Licensed.
*
* Copyright 2011-2012 Seth Wilson @SethWilson
*
* ------------------------------------------------
* author: Seth Wilson
* version: 0.1
* url:
* source:
*/
function runthis() {
// your JavaScript code goes here!
jQuery('#custaddress').val('27 Bannisdale Way, Carlisle');
jQuery('#custphone').val('9056907127');
jQuery('#main_email').val('[email protected]');
jQuery('input[name="members[0][firstname]"').val('Seth');
jQuery('input[name="members[0][lastname]"').val('Wilson');
jQuery('input[name="members[0][age]"').val('19-64');
jQuery('input[name="members[0][email]"').val('[email protected]');
//jQuery('#ctcm_BeginnerClinic1').val('');
jQuery('input[name="members[0][mensdoubles]"]').attr('checked','checked');
jQuery('#custwaiver').attr('checked','checked');
//jQuery('#ctcm_LadiesDoubles1').val('');
//jQuery('#ctcm_MixedDoubles1').val('');
}
if (typeof jQuery == 'undefined') {
var jQ = document.createElement('script');
jQ.type = 'text/javascript';
jQ.onload=runthis;
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
document.body.appendChild(jQ);
} else {
runthis();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment