Skip to content

Instantly share code, notes, and snippets.

View lukeclifton's full-sized avatar

Luke Clifton lukeclifton

  • United Kingdom
View GitHub Profile
{ hotel_id: 80,
arrival_date: 2019-04-10T00:00:00.000Z,
departure_date: 2019-04-11T00:00:00.000Z,
stay_dates: [
{
date: 2019-04-10T00:00:00.000Z,
rate_id: 7283,
room_type_id: 630,
adults: '1',
children: 0,
@lukeclifton
lukeclifton / gist:46ab5189b12554550d1097b365a7c698
Created September 24, 2018 22:27
jQuery Two Way Data Binding Example
<input id="input" type="text">
<br>
This is the message: <span id="output"></span>
<script type="text/javascript">
var $input = $('#input');
var $output = $('#output');
// A controller for getting/setting the bound variable
var message = {
content: null,
get: function() {
[
{
"chainId": "chain001",
"domains": [
"http://www.domain.com",
"https://www.domain.com"
],
"ibes": [
{
@lukeclifton
lukeclifton / gist:02184adbc095b2013392
Created November 13, 2014 12:26
rendered and helpers
Template.jobCreate.rendered = function() {
$("select[name='customerId']" ).change(function(e) {
var customerId = $(this).val();
});
};
Template.jobCreate.helpers({
customer: function() {
@lukeclifton
lukeclifton / gist:bfaaa8cea70824f89c90
Created November 13, 2014 11:46
formsubmitter function
Template.customerCreate.rendered = function () {
$('.formsubmitter').click(function(e) {
e.preventDefault();
var form = '#' + $(this).data('form-id');
$(form).submit();
});
}