CINXE.COM
Free Supercharging w/ Tesla Referral Code Link
<html> <head> <!-- Global site tag (gtag.js) - Google Ads: 777751312 --> <script async src="https://www.googletagmanager.com/gtag/js?id=AW-777751312"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-777751312'); </script> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="/tesla/jquery.scrollify.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-55581850-1', 'auto', {'allowLinker': true}); ga('require', 'linker'); ga('linker:autoLink', ['danstools.com','unixtimestamp.com','url-encode-decode.com','cssfontstack.com','hexcolortool.com','htaccessredirect.net','jspretty.com','jsmini.com','jsobfuscate.com','md5hashgenerator.com','regextester.com','cleancss.com','favicon-generator.org','website-performance.org','permissions-calculator.org','conversoes.org','convertissez.fr','convertitore.net','elconvertidor.com','files-conversion.com','henkan-muryo.com','konvertirung.org','konvertor.org','tahwil.net','zhuan-huan.com','bootsnipp.com'] ); ga('send', 'pageview'); </script> <style> body { background: black !important; font-size:1.5em; } .page.active { display:block; } .y.axis,.x.axis { color:white; } .x.axis line { color:#ccc; } .y.axis text,.x.axis text{ color:black; } .middle { /* position: absolute; top: 10%; transform: translate(0,-10%);*/ width:100% } section { position:relative; margin: 0 -15px; padding: 0 15px; } h1 { font-size: 4vw; background: #333; padding: 1em 0; text-align: center; margin: .67em -15px; color: white; text-shadow: 1px 1px #333; } h2 { font-weight: bold; font-size:1.5em; } h3 { font-size:1.2em; } h4 { font-size:1em; } .btn-toggle { margin-right:2em; } #nav a { color:white; } #nav { background: black; box-shadow: 1px 0 10px black; height: 100%; position: fixed; top: 0; z-index:1000; } .refButton { } .navbutton { color: white; font-size:20px; font-weight: bold; margin-left:-15px; margin-right:-15px; padding-right:15px; text-align:right; display:block; } .navButton.active { box-shadow:-2px 0 10px red; font-weight:bolder; } #body { background: white; } #speedChart { height: 50vh; } .redcar path { fill: red; } #refer { margin: 30px 5px; border: 1px solid #333; border-radius: 3px; padding: 10px; color:white; } .order { position:fixed; bottom:0; right:0; z-index:999; padding:10px; background:white; } .bullet { background: #eee; border-radius: 3px; border: 1px solid #ccc; margin-bottom: 10px; padding: 10px 10px; } .bullet-head { font-size: 2em; } .bullet p { font-size: 1.25em; } .bullet .fa { font-size:4em; } .card { text-align: center; padding:20px; } .card i { font-size: 4em; } .card h2{ } .card p{ text-align:left; } .navSliders { width:5px; background-color:#b10000; } .navSliders.active { background: red; } .navSliders.active > .slideText { font-size:2em; } .slideText { padding-left:30px; white-space:nowrap; } #navslider { position:fixed; left: 0; width:50px; z-index:1000; background-color:none; } #navslider.scrolling { /* width:100%;*/ background-color: #ffffffee; } </style> <title>Free Supercharging w/ Tesla Referral Code Link</title><meta name="keywords" content="tesla,referral,code,range,link, performance, cost, safety, environment,convenient, charging, energy,model 3, model x, model s,supercharger,free,code,electric,car"><meta name="description" content="Get free Tesla Supercharging with the referral code 'daniel15856'. Give the code to your Delivery Advisor, or use this link. Learn how a Tesla EV compares to other gas and electric cars and find out the advantages of an electric car."></head> <body> <div id="nav" class="navlinks hidden-xs hidden-sm col-md-3 col-lg-2"> </div> <div class="order hidden-xs hidden-sm col-xs-12 col-sm-12 col-md-9 col-lg-10"> <div class="row"> <div class="col-md-12"> <a href="https://www.tesla.com/referral/daniel15856" class="btn btn-warning form-control" onclick="trackLink('tesla','click');"><strong>6 Months Free Charging w/ code "daniel15856" </strong></a> <br/></div> </div> </div> <div id="body" class="col-sm-9 col-md-9 col-lg-10 pull-right"> <section class="page" data-section-name="free_supercharging"> <div class="middle"> <h1>Get Free Supercharging <br/><small>Plus a $3750 federal tax crediti<br/></small></h1> <!-- <h3>You can even return it within 3 days for any reason if you don't like it!</h3>--> <div class="row"> <div class="col-md-offset-2 col-md-8"> <div class="card"> <h2 class="text-center"><small>Give this code to your delivery advisor:</small><br/>daniel15856</h2> <h2 class="text-center"><small>Order Online</small></h2> <a onclick="trackLink('orderpage','click');" href="https://www.tesla.com/model3/design?&redirect=no&referral=daniel15856" class="btn btn-primary form-control" style="margin-bottom:10px">Model 3</a><br/> <a onclick="trackLink('orderpage','click');" href="https://www.tesla.com/models/design?&redirect=no&referral=daniel15856" class="btn btn-primary form-control" style="margin-bottom:10px">Model S</a><br/> <a onclick="trackLink('orderpage','click');" href="https://www.tesla.com/modelx/design?&redirect=no&referral=daniel15856" class="btn btn-primary form-control" style="margin-bottom:10px">Model X</a><br/> <h2 class="text-center"><small>Find Out More About Teslas</small></h2> <div id="reflinks" style="min-height: 35em;"></div> </div> </div> </div> </section> <div class="clearfix"></div> <section class="page" data-section-name="performance"> <div class="middle"> <h1>Performance Is Better than Gas</h1> <div class="col-md-12"> <svg id="speedChart"></svg> </div> <div class="col-md-4"> <h2 class="text-center">Speed</h2> <button class="btn btn-danger" id="startRace">Start the Race!</button> <button class="btn btn-default" id="resetRace">Reset</button><br/> <h4>See a mock race against a gas car</h4> <p>Or <a class="scrolllink" href="#settings">select another</a> car to see how it compares to a Tesla</p> </div> <div class="col-md-4"> <h2 class="text-center">Handling</h2> <p>With the main weight of the vehicle (the batteries) in the floor, it gives the Tesla a much lower center of gravity. This makes the car handle much better than a gas car, reducing any body roll significantly.</p> </div> </div> </section> <section class="page" data-section-name="cost"> <div class="middle"> <h1>Teslas No Longer Cost $100,000</h1> <div class="row"> <div class="col-md-4"> <h2>Model 3 starts at $46,000</h2> <h3>Price of electricity is cheaper and more stable</h3> <h3>Electric cars are cheaper and easier to maintain <small>(<a class="scrolllink" href="#maintenance">see Maintenance</a>)</small></h3> <h3>$3750 federal tax credit</h3> <h3>State tax credits exist</h3> </div> <div class="col-md-8"> <svg id="costChart"></svg> </div> </div> </div> </section> <section class="page" data-section-name="safety"> <div class="middle"> <h1>Safety</h1> <div class="row"> <div class="col-md-6"> <img src="m3-nhtsa-blog-09272018.jpg" class="pull-left" style="width:100%;"/> </div> <div class="col-md-6" style="margin-top:30px"> <ul> <li>Tesla Model 3 is rated 5-star in every NHTSA test.</li> <li>Tesla Model 3 has the lowest 'probability of injury'</li> <li>Having no engine in the car, and the battery in the floor give Tesla several design advantages with regard to safety</li> <ol> <li>The reinforced battery section protect the passenger cabin. See the Pole Crash Test comparison with a Volvo S60 below.</li> <li>The battery in the floor give a Tesla a very low Center of Gravity. See the Rollover Test comparison with a BMW X6 </li> </ol> </ul> </div> </div> <hr/> <div class="row"> <div class="col-md-12"> <h3>Pole Crash Test vs. Volvo S60</h3> </div> <div class="col-md-6"> <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/ABEznFFbmJw?start=43" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> </div> <div class="col-md-6"> <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/vybsBTkppYI?start=87" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> </div> </div> <hr/> <div class="row"> <div class="col-md-12"> <h3>Rollover Crash Test vs. BMW X6 <small class="text-muted">(NHTSA doesn't require rollover tests, so videos are difficult to find , the BMW clip was best match)</small></h3> </div> <div class="col-md-6"> <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/L24xzJkCGdk?start=87" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> </div> <div class="col-md-6"> <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/JFseZsnOq1Q?start=56" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> </div> </div> </div> </div> </section> <section class="page" data-section-name="range"> <div class="middle"> <h1>Long Distance Travel</h1> <div class="row"> <div class="col-md-4"> <p> A Tesla is up for a full day of driving. A stop for lunch in Greenwich, CT, and then a restroom break in Newark, DE, you won't miss filling up at a gas station. And with Autopilot you will arrive rested and stress free.</p> <p>The navigation system in the car will plan your stops and navigate you on the best routes for charging.</p> <a style="display:block;margin:20px auto;" href="https://www.tesla.com/trips" target="_new" class="btn btn-primary" rel="nofollow">Plan Your Own Trip</a> </div> <div class="col-md-8"> <img src="/tesla/route.png" width="100%"/> </div> </div> </div> </section> <section class="page" data-section-name="charging"> <div class="middle"> <h1>How To Charge</h1> <div class="row"> <div class="col-md-4"> <div class="card"> <i class="fa fa-bolt"></i> <h2>Supercharger Network</h2> <p>Tesla has the largest and fastest charging network, making even a cross-country trip very easy to accomplish.</p> <p>Can charge at over 400 miles per hour, with over 1300 charing locations and rapidly growing.</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-home"></i> <h2>At Home</h2> <p>Most of the time you charge at home.</p> <p>You can use a standard power outlet, which will add ~5 miles for each hour of charging (60 miles/12 hours)</p> <p>If you need faster charging, a drier outlet, or charging station can be installed for less than $500</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-building-o"></i> <h2>Destination Chargers</h2> <p>There is a large network of 'destination chargers', chargers at stores, hotels, or office parks, from Tesla and others.</p> </div> </div> </div> <hr width="50%"/> <h2 class="text-center">Find Chargers Near You</h2> <div class="embed-responsive embed-responsive-16by9"> <iframe class="embed-responsive-item" src='https://www.plugshare.com/widget2.html?latitude=37.09024&longitude=-95.712891&spanLat=20&spanLng=20&plugs=1,2,3,4,5,6,42,13,7,8,9,10,11,12,14,15,16,17'></iframe> </div> </div> </section> <section class="page" data-section-name="convenience"> <div class="middle"> <h1>Convenience</h1> <div class="row"> <div class="col-md-4"> <div class="card"> <i class="fa fa-battery-full"></i> <h2>No More Gas Stops</h2> <p>Never stop to refuel in your daily driving.</p> <p>Leave your house every day with a <strong>full tank</strong>.</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-map-signs"></i> <h2>Autopilot</h2> <p>Your daily commute can now be a relaxing experience. Especially in stop-and-go traffic.</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-headphones"></i> <h2>Comfort</h2> <p>The ride is very smooth and quiet. There are no vibrations from explosions and hundreds of moving parts.</p> </div> </div> </div> </section> <section class="page" data-section-name="maintenance"> <div class="middle"> <h1>Maintenance has never been easier</h1> <div class="row"> <div class="col-md-4"> <div class="card"> <i class="fa fa-cogs"></i> <h2>Infrequent Maintenance</h2> <p>No more oil changes.</p> <p>Tires rotated every 2 years.</p> <p>Coolant flush every 4 years.</p> <p>Because of regenerative braking, brakes last well over 100k miles.</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-ambulance"></i> <h2>Mobile Service</h2> <p>Tesla has Mobile Rangers who can perform many service calls at your home or office</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-hospital-o"></i> <h2>Service Centers</h2> <p>Service centers are nationwide, even wordwide, with the locations continually growing.</p> </div> </div> </div> </section> <section class="page" data-section-name="geopolitical"> <div class="middle"> <h1>Electric Cars, Not Just For Liberal Hippies</h1> <div class="row"> <div class="col-md-4"> <div class="card"> <i class="fa fa-flag"></i> <h2>Patriotism</h2> <p>Teslas are <strong>made & designed in American</strong>, with many suppliers and employees inside the US.</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-fighter-jet"></i> <h2>National Security</h2> <p><strong>Over 55% of America's electricity comes from domestic natural gas and coal</strong>, so by driving a Tesla you are burning American coal and natural gas, rather than imported foreign oil</p> </div> </div> <div class="col-md-4"> <div class="card"> <i class="fa fa-bolt"></i> <h2>Free Market Economics</h2> <p><strong>Energy diversity</strong>, electric cars can run on natural gas, coal, nuclear, hydro, wind, or solar, allowing for more price stability.</p> </div> </div> </div> </section> <section class="page" data-section-name="settings"> <div class="middle"> <h1>Is a Tesla right for me?</h1> <div class="col-md-offset-2 col-md-8"> <p>Do you drive less than 250 miles in a typical day?</p> <div id="milesDriven" class="btn-group btn-toggle"> <button class="btn btn-primary active">YES</button> <button class="btn btn-default">NO</button> </div> <hr/> <p>Do you have off-street parking?</p> <div id="streetParking" class="btn-group btn-toggle"> <button class="btn btn-primary active">YES</button> <button class="btn btn-default">NO</button> </div> <hr/> <p>Does your place of employment offer charging options?</p> <div id="workParking" class="btn-group btn-toggle"> <button class="btn btn-default">YES</button> <button class="btn btn-primary active">NO</button> </div> </div> <div class="col-md-offset-3 col-md-6" id="introExp"> <h2 class="text-bold text-success">You are a perfect candidate for a Tesla!</h2> </div> <div class="col-md-offset-2 col-md-8"> <hr/> <form class="form-horizontal"> <div class="form-group"> <label for="inputEmail3" class="col-sm-6 control-label">Are you considering a new car?</label> <div class="col-sm-6"> <select class="form-control" id="compCar"><option value="">Choose One</option></select> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-6 control-label">What Tesla are you interested in?</label> <div class="col-sm-6"> <select class="form-control" id="teslaCar"><option value="">Choose One</option></select> </div> </div> <div class="form-group"> <label for="inputPassword3" class="col-sm-6 control-label"></label> <div class="col-sm-6"> <button class="btn btn-primary" onclick="javascript: $.scrollify.move('#performance')">Compare!</button> </div> </div> </form> <p>Or, check out these comparisons:</p> <p style="min-height: 25em;" id="compLinks"></p> </div> </div> </section> <!-- <section class="page" data-section-name="environmental"> <div class="middle"> <h1>Environmental</h1> <h2>There are many reasons other than the environment to choose a Tesla, but if that is a driving force for you, a Tesla is the best option. </h2> <h3>You can choose an electric plan that is 100% wind/solar, or install solar panels on your roof.</h3> </div> </section> --> </div> <div id="navslider" class="hidden-md hidden-lg hidden-xl"> </div> <script src="https://d3js.org/d3.v5.min.js" charset="utf-8"></script> <script> var measure = '60'; var speedGraph,speedGraphBar,speedGraphText,x,y,speedGraphData=[],getpage,q; var speedData = [ {"class": "sedan", "brand": "Tesla", "model": "Model 3 Perf", "comp":"M3", "cost":64000, "60": 3.2, "fuelcost": 500, "range":310}, {"class": "sedan", "brand": "BMW", "model": "M3", "comp":"Model 3 Perf", "cost":66500, "60": 4.2, "fuelcost": 2550}, {"class": "sedan", "brand": "Tesla", "model": "Model 3 AWD", "comp":"330i", "cost":53000, "60": 4.5, "fuelcost": 500, "range":310}, {"class": "sedan", "brand": "Audi", "model": "A4", "comp":"Model 3 AWD", "cost":45500, "60": 7.1, "fuelcost": 1850}, {"class": "sedan", "brand": "Toyota", "model": "Prius", "comp":"Model 3 RWD", "cost":30565, "60": 10.5, "fuelcost": 800}, {"class": "sedan", "brand": "Tesla", "model": "Model 3 RWD", "comp":"Prius", "cost":48000, "60": 4.8, "fuelcost": 500, "range":310}, {"class": "suv", "brand": "Tesla", "model": "Model X 75D", "comp":"e-Tron", "cost":83000, "60": 4.9, "fuelcost": 700, "range":238}, {"class": "suv", "brand": "Tesla", "model": "Model X 100D", "comp":"e-Tron", "cost":99500, "60": 4.7, "fuelcost": 750, "range":295}, {"class": "sedan", "brand": "Mercedes", "model": "C-class", "comp":"Model 3 AWD", "cost":41245, "60": 6.1, "fuelcost": 1900}, {"class": "sedan", "brand": "Toyota", "model": "Corolla", "comp":"Model 3 RWD", "cost":23800, "60": 9.5, "fuelcost": 1300}, {"class": "sedan", "brand": "Honda", "model": "Civic", "comp":"Model 3 RWD", "cost":26800, "60": 6.9, "fuelcost": 1150}, {"class": "sedan", "brand": "Honda", "model": "Accord", "comp":"Model 3 RWD", "cost":35800, "60": 5.7, "fuelcost": 1500}, {"class": "sedan", "brand": "Nissan", "model": "Leaf", "comp":"Model 3 RWD", "cost":36200, "60": 8.0, "fuelcost": 600, "range":151}, {"class": "sedan", "brand": "Chevrolet","model": "Bolt", "comp":"Model 3 RWD", "cost":36620, "60": 6.3, "fuelcost": 550, "range":238}, {"class": "suv", "brand": "Jaguar", "model": "i-Pace", "comp":"Model 3 AWD", "cost":80500, "60": 4.5, "fuelcost": 850, "range":234}, {"class": "suv", "brand": "Audi", "model": "e-Tron", "comp":"Model 3 AWD", "cost":86700, "60": 5.5, "fuelcost": 800, "range":239}, {"class": "sedan", "brand": "Porche", "model": "Taycan", "comp":"Model 3 Perf", "cost":80000, "60": 3.5, "fuelcost": 800, "range":310}, {"class": "sedan", "brand": "BMW", "model": "330i", "comp":"Model 3 AWD", "cost":42250, "60": 5.5, "fuelcost": 1900}, {"class": "sedan", "brand": "BMW", "model": "i3", "comp":"Model 3 RWD", "cost":49295, "60": 7.0, "fuelcost": 600, "range":0}, {"class": "sedan", "brand": "BMW", "model": "230i", "comp":"Model 3 AWD", "cost":37300, "60": 5.2, "fuelcost": 1850}, {"class": "sedan", "brand": "BMW", "model": "340i", "comp":"Model 3 AWD", "cost":50950, "60": 4.6, "fuelcost": 2000}, {"class": "sedan", "brand": "BMW", "model": "M240i", "comp":"Model 3 Perf", "cost":47800, "60": 4.2, "fuelcost": 2100}, {"class": "sedan", "brand": "BMW", "model": "430i", "comp":"Model 3 AWD", "cost":46600, "60": 5.6, "fuelcost": 1850}, {"class": "sedan", "brand": "BMW", "model": "440i", "comp":"Model 3 AWD", "cost":53000, "60": 4.7, "fuelcost": 2000}, {"class": "sedan", "brand": "Mercedes", "model": "E-Class", "comp":"Model 3 RWD", "cost":59950, "60": 5.0, "fuelcost": 2150}, {"class": "sedan", "brand": "Audi", "model": "S3", "comp":"Model 3 AWD", "cost":48950, "60": 4.6, "fuelcost": 2000}, {"class": "sedan", "brand": "Audi", "model": "S4", "comp":"Model 3 Perf", "cost":55800, "60": 4.4, "fuelcost": 2100}, {"class": "sedan", "brand": "Audi", "model": "S5", "comp":"Model 3 Perf", "cost":58800, "60": 4.5, "fuelcost": 2100}, {"class": "sedan", "brand": "Audi", "model": "A3", "comp":"Model 3 AWD", "cost":40700, "60": 5.8, "fuelcost": 1500}, {"class": "sedan", "brand": "Audi", "model": "A5", "comp":"Model 3 AWD", "cost":50200, "60": 5.7, "fuelcost": 1850}, {"class": "sedan", "brand": "Audi", "model": "A6", "comp":"Model 3 Perf", "cost":67100, "60": 5.1, "fuelcost": 1900}, {"class": "sedan", "brand": "Audi", "model": "A7", "comp":"Model 3 Perf", "cost":76300, "60": 5.2, "fuelcost": 2150} ] ; var sliderHeight = window.innerHeight/$('.page').length; var brand = ''; var model = ''; $( document ).ready(function() { $.scrollify({ section : ".page", overflowScroll: true, setHeights:true, touchScroll: false, before: function() { $('.navButton').removeClass('active'); $('.navButton.'+$.scrollify.current().data('section-name')).addClass('active'); $('.navsliders').removeClass('active'); $('#slider'+$.scrollify.current().data('section-name')).addClass('active'); } }); $('.page').each(function(i,v) { // $(this).data('sectionName',$(this).attr('id')); var dataname = $(this).data('section-name'); $('#nav').append('<a href="#'+dataname+'" class="scrolllink navButton '+dataname+'">'+dataname.replace("_"," ")+'</a>'); $('#navslider').append('<div style="line-height:'+sliderHeight+'px; height:'+sliderHeight+'px" data-slidelink="'+dataname+'" id="slider'+dataname+'" class="navsliders"><span class="slideText hidden">'+dataname.replace("_"," ")+'</span></div>'); if (i!=0) { $('#reflinks').append('<a href="#'+dataname+'" class="scrolllink refButton btn btn-default form-control" style="margin-bottom:15px;"><strong>'+dataname.replace("_"," ")+'</strong></a>'); } }); $('#nav').prepend('<div id="refer" style="visibility:hidden"><strong>6 Months Free Supercharging</strong><br/>If you found this resource helpful, order using the referral code <strong><a href="https://www.tesla.com/referral/daniel15856" onclick="trackLink(\'tesla\',\'click\');">daniel15856</a></strong> to get six months of free supercharging.</div>'); var done = []; $.each(speedData, function(i,v) { if (v.brand == 'Tesla') { $('#teslaCar').append('<option value="'+v.model+'">'+v.brand+' '+v.model+'</option>'); } else { $('#compCar').append('<option value="'+v.model+'">'+v.brand+' '+v.model+'</option>'); if (done.indexOf(v.model) === -1) { if (brand != '' && brand == v.brand) { $('#compLinks').append('<a href="/tesla/'+v.model+'" class="btn">'+v.model+' vs Tesla '+v.comp+'</a>'); } done.push(v.model); } if (done.indexOf(v.brand) === -1) { if (brand == '' && model == '') { $('#compLinks').append('<a href="/tesla/'+v.brand+'" class="btn">'+v.brand+' vs Tesla</a>'); } done.push(v.brand); } } }); $("#navslider").on("touchend",function(e){ $.scrollify.enable(); $('.slideText').addClass('hidden'); $('#navslider').removeClass('scrolling'); $('#navslider').animate({ width: "50px", },300); }); $("#navslider").on("touchstart",function(e){ e.preventDefault(); $('.slideText').removeClass('hidden'); $('#navslider').addClass('scrolling'); $('#navslider').animate({ width: "100%", },300); $.scrollify.disable(); }); $("#navslider").on("touchmove",function(e){ if (e.cancelable) { e.preventDefault(); } var touchx = e.changedTouches[0].clientX; var touchy = e.changedTouches[0].clientY; $.each($(this).children(), function() { var p = $(this).position(); var h = $(this).height(); var w = $(this).width(); if (touchy>p.top && touchy<p.top+h) { $.scrollify.enable(); $.scrollify.instantMove('#'+$(this).data("slidelink")); $.scrollify.disable(); // $('#nav>.'+$(this).data("slidelink")).click(); $(this).addClass('active'); } else { $(this).removeClass('active'); } }); }); $('.scrolllink').click(function(e){ e.preventDefault(); trackLink('navlink'+$(this).attr("href"),'click'); $.scrollify.move($(this).attr("href")); }); $('#resetRace').on('click', function() { drawSpeedGraph(); }); $('#startRace').on('click', function() { speedGraph.transition() .ease(d3.easeLinear) .duration(function(d) { return d['60']*1000; }) .attr("x", function(d) { return x(60); }) speedGraphBar.transition() .ease(d3.easeLinear) .duration(function(d) { return d['60']*1000; }) .attr("width", function(d) { return x(60); }) speedGraphText.transition() .ease(d3.easeLinear) .duration(function(d) { return d['60']*1000; }) .attr("x", function(d) { return x(60)/2; }) .text(function(d) { return d['60']+'s'; }) }); $('#compCar,#teslaCar').on('change', function() { speedGraphData = []; $.each(speedData, function(i,v) { if ($('#compCar').val() == v.model || $('#teslaCar').val() == v.model || $('#compCar').val() == v.comp || $('#teslaCar').val() == v.comp) { speedGraphData.push(v) } }); drawSpeedGraph(); drawCostGraph(); }); $('.btn-toggle').on('click',function() { $(this).find('.btn').toggleClass('active'); if ($(this).find('.btn-primary').length>0) { $(this).find('.btn').toggleClass('btn-primary'); } if ($(this).find('.btn-danger').length>0) { $(this).find('.btn').toggleClass('btn-danger'); } if ($(this).find('.btn-success').length>0) { $(this).find('.btn').toggleClass('btn-success'); } if ($(this).find('.btn-info').length>0) { $(this).find('.btn').toggleClass('btn-info'); } $(this).find('.btn').toggleClass('btn-default'); if ($('#milesDriven').find('.active').text() == 'NO') { $('#introExp').html('<h2 class="text-danger">You drive quite a bit daily, so a Tesla is probably not ideal for you.</h2>'); } else if ($('#streetParking').find('.active').text() == 'NO' && $('#workParking').find('.active').text() == 'NO') { $('#introExp').html('<h2 class="text-danger">You don\'t have a convenient place to charge, so a Tesla may not be the best solution.</h2>'); } else { $('#introExp').html('<h2 class="text-success">You are a perfect candidate for a Tesla!</h2>'); } }); q = ''; getpage = ''; if (getpage != '') { $.scrollify.instantMove("#"+getpage); } if (q != '') { $.each(speedData, function(i,v) { if (v.model == q || v.brand == q || v.brand == 'Tesla') { speedGraphData.push(v) } }); if (window.location.hash == '') { $.scrollify.instantMove("#performance"); } } else if ($('#compCar').val() != '' || $('#teslaCar').val() != '') { $.each(speedData, function(i,v) { if ($('#compCar').val() == v.model || $('#teslaCar').val() == v.model || $('#compCar').val() == v.comp || $('#teslaCar').val() == v.comp) { speedGraphData.push(v) } }); } else { speedGraphData = speedData.slice(0,5); } drawSpeedGraph(); drawCostGraph(); // drawPowerGraph(); }); function drawPowerGraph() { d3.selectAll("#priceChart > *").remove(); var svg = d3.select("#priceChart"); var margin = {top: 20, right: 10, bottom: 60, left: 40}; svg .attr("width", '100%') .attr("height", '40%') .attr('preserveAspectRatio','xMinYMin') var width = $('#priceChart').parent().width() - margin.left - margin.right; var height = $('#priceChart').parent().height() - margin.top - margin.bottom; var parseTime = d3.timeParse("%Y"); var x = d3.scaleTime().range([0, width]); var y = d3.scaleLinear().range([height, 0]); var valueline = d3.line() .x(function(d) { return x(d.year); }) .y(function(d) { return y(d.electric); }); var valueline2 = d3.line() .x(function(d) { return x(d.year); }) .y(function(d) { return y(d.gas); }); d3.csv("prices.csv").then(function(data) { data.forEach(function(d) { d.year = parseTime(d.year); d.electric = +d.electric*27; d.gas = +d.gas*2.9; }); x.domain(d3.extent(data, function(d) { return d.year; })); y.domain([d3.min(data, function(d) { return (d.electric<d.gas ? d.electric : d.gas); }),d3.max(data, function(d) { return (d.electric>d.gas ? d.electric : d.gas); })]); // Add the valueline path. svg.append("path") .data([data]) .attr("class", "line") .attr("d", valueline) .attr("fill","none") .attr("stroke","steelblue") .attr("stroke-width","2px"); svg.append("path") .data([data]) .attr("class", "line") .attr("d", valueline2) .attr("fill","none") .attr("stroke","red") .attr("stroke-width","2px"); // Add the X Axis svg.append("g") .attr("transform", "translate(0," + height + ")") .call(d3.axisBottom(x)); // Add the Y Axis svg.append("g") .call(d3.axisLeft(y)); }); } function drawCostGraph() { var data = []; d3.selectAll("#costChart > *").remove(); var svg = d3.select("#costChart"); var margin = {top: 20, right: 10, bottom: 60, left: 40}; svg .attr("width", '100%') .attr("height", '40%') .attr('preserveAspectRatio','xMinYMin') var width = $('#costChart').parent().width() - margin.left - margin.right; var height = $('#costChart').parent().height() - margin.top - margin.bottom; var g = svg.append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); var x = d3.scaleBand() .rangeRound([0, width]) .paddingInner(0.05) .align(0.1); var y = d3.scaleLinear() .rangeRound([height, 0]); var z = d3.scaleOrdinal() .range(["#ccc", "red"]); var z1 = d3.scaleOrdinal() .range(["#eee", "pink"]); // var keys = d3.keys(stackArray[0]); var keys = ['cost','fuelcost']; data = speedGraphData.slice(); speedData.forEach(function(cell, i) { var tmp = speedData[Math.floor(Math.random()*speedData.length)]; if (data.length < 15 && !data.includes(tmp) ) { data.push(tmp); } }); data.forEach(function(cell, i) { cell.fuelcost = cell.fuelcost*5; }); data.sort(function(x, y){ return d3.ascending(y.cost+y.fuelcost, x.cost+x.fuelcost); }); x.domain(data.map(function(d) { return d.model; })); y.domain([0, d3.max(data, function(d) { return d.cost+d.fuelcost })]).nice(); z.domain(keys); z1.domain(keys); g.append("g") .selectAll("g") .data(d3.stack().keys(keys)(data)) .enter().append("g") .selectAll("rect") .data(function(d) { return d; }) .enter().append("rect") .attr("fill", function(d) { var keyname,color = false; if (d.data.cost == d[1]) { keyname = 'cost'; } else { keyname = 'fuelcost'; } $.each(speedGraphData, function(i,v) { if (v.model == d.data.model) { color = true; } }); if (color) { return z(keyname); } else {return z1(keyname);} }) .attr("x", function(d) { return x(d.data.model); }) .attr("y", function(d) { return y(d[1]); }) .attr("height", function(d) { return y(d[0]) - y(d[1]); }) .attr("width", x.bandwidth()) ; g.append("g") .attr("class", "axis") .attr("transform", "translate(0," + height + ")") .call(d3.axisBottom(x)) .selectAll("text") .style("text-anchor", "end") .attr("dx", "-.8em") .attr("dy", ".15em") .attr("transform", "rotate(-35)"); g.append("g") .attr("class", "axis") .attr("transform", "translate( 0, 0 )") .call(d3.axisLeft(y).ticks(null, "s")) .append("text") .attr("x", width) .attr("y", y(y.ticks().pop()) - 0.5) .attr("dy", "0.32em") .attr("fill", "#000") .attr("font-weight", "bold") .attr("text-anchor", "start"); var legend = g.append("g") .attr("font-family", "sans-serif") .attr("font-size", 10) .attr("text-anchor", "end") .selectAll("g") .data(keys.slice().reverse()) .enter().append("g") .attr("transform", function(d, i) { return "translate(0," + i * 20 + ")"; }); legend.append("rect") .attr("x", width - 21) .attr("width", 19) .attr("height", 19) .attr("fill", z); legend.append("text") .attr("x", width - 26) .attr("y", 9.5) .attr("dy", "0.32em") .text(function(d) { return (d == 'fuelcost' ? '5yr Fuel Cost' : 'Vehicle Cost'); }); } function drawSpeedGraph() { d3.selectAll("#speedChart > *").remove(); var svg = d3.select("#speedChart"); var margin = {top: 40, right: 100, bottom: 30, left: 80}; // width = +svg.attr("width") - margin.left - margin.right, // height = +svg.attr("height") - margin.top - margin.bottom; var width = $('#speedChart').parent().width() - margin.left - margin.right; var height = $('#speedChart').parent().height() - margin.top - margin.bottom; svg .attr("width", '100%') .attr("height", '100%') // .attr('viewBox','0 0 '+Math.min(width,height)+' '+Math.min(width,height)) .attr('preserveAspectRatio','xMinYMin') x = d3.scaleLinear().range([0, width]); y = d3.scaleBand().range([height, 0]); var g = svg.append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); speedGraphData.sort(function(a, b) { return a[measure] - b[measure]; }); x.domain([0, measure]); y.domain(speedGraphData.map(function(d) { return d.model; })).padding(0.1); g.append("g") .attr("class", "x axis") .attr("transform", "translate(0," + height + ")") .attr("color","#ccc") .call(d3.axisBottom(x).ticks(parseInt(measure)/10).tickFormat(function(d) { return parseInt(d)+' mph'; }).tickSizeInner([-height])); g.append("g") .attr("class", "y axis") .call(d3.axisLeft(y)); g.append("text") .attr("x", (width / 2)) .attr("y", 0 - (margin.top / 2)) .attr("text-anchor", "middle") .style("font-size", "16px") .style("text-decoration", "underline") .text("0-60 Acceleration Comparison"+(brand!='' || model!='' ? (model!='' ? ' with '+brand : ' with '+brand+' '+model) : '')); speedGraphBar = g.selectAll(".bar") .data(speedGraphData) .enter().append("rect") .style("fill", "#a90000") .style("opacity",".3") .attr("x", 0) .attr("width", 0) .attr("height", 2) .attr("y", function(d) { return y(d.model)+y.bandwidth()/2; }) speedGraphText = g.selectAll(".bar") .data(speedGraphData) .enter().append("text") .attr("x", 0) .attr("y", function(d) { return y(d.model)+y.bandwidth()/2; }) speedGraph = g.selectAll(".bar") .data(speedGraphData) .enter().append("svg:image") .attr("xlink:href",function(d) { if (d.brand!='Tesla') { return "/tesla/1918554.svg"; } else { return "/tesla/1918554red.svg";} }) .attr("r", 25) .attr("x", 0) .attr("width", 75) .attr("height", y.bandwidth()) .attr("y", function(d) { return y(d.model); }) ; } var trackLink = function(url,type) { ga('send', 'event', type, url, 'tesla', { 'transport': 'beacon', }); } </script> </body> </html>