JSFiddle - React, Tailwind, and code Playground

by eimajenthat

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/rivets/0.7.2/rivets.bundled.min.js"></script>
<div id="contentWrap">
    <select>
        <option rv-each-job="jobs" rv-value="job.id">{ job.job_number }</option>
    </select>
</div>

JavaScript

$(document).ready(function(){
    window.view = rivets.bind($('#contentWrap'),{
        truck:{id:1,job_id:3},
        jobs:[
            {id:1,job_number:'thing1'},
            {id:2,job_number:'thing2'},
            {id:3,job_number:'thing3'},
            {id:4,job_number:'thing4'},
        ]
    });
});