Skip to content

Instantly share code, notes, and snippets.

@maxidr
Created October 3, 2017 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxidr/c0a476dfefec1a046540966653d19dc0 to your computer and use it in GitHub Desktop.
Save maxidr/c0a476dfefec1a046540966653d19dc0 to your computer and use it in GitHub Desktop.
Next Trip Widget
(function(w,d,s,a){
var t,f;w['NextTripBookingRef']=a;w[a]=w[a]||function(){(w[a].q=w[a].q||[]).push(arguments)};
w[a].s=w.location.origin;t=d.createElement('script');f=d.getElementsByTagName('script')[0];
t.async=1;t.src=s;f.parentNode.insertBefore(t,f);d.querySelectorAll('[data-nexttrip]').forEach(
function(b){b.addEventListener('click', function(e){w[a]('dataset', e.target.dataset);
e.preventDefault()})})
})(window, document,'http://localhost:3000/booking.js','nextTrip');
nextTrip.customerId = 'ALLUSA'
nextTrip.dealId = 'SHUTTLES'
nextTrip.productId = 'Shuttle'
nextTrip.lang = 'es'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment