cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="container-fluid">
  <div class="row">
    <div class="col-sm-6">
      <div class="row">
        <div class="col-1 year first-date">
          '00
        </div>
        <div class="col-1 year">
          '01
        </div>
        <div class="col-1 year">
          '02
        </div>
        <div class="col-1 year">
          '03
        </div>
        <div class="col-1 year">
          '04
        </div>
        <div class="col-1 year">
          '05
        </div>
        <div class="col-1 year">
          '06
        </div>
        <div class="col-1 year">
          '07
        </div>
        <div class="col-1 year">
          '08
        </div>
        <div class="col-1 year">
          '09
        </div>
        <div class="col-1 year">
          '10
        </div>
        <div class="col-1 year">
          '11
        </div>
      </div>
      <div class="row">
        <div class="col-sm-12">
          <div class="row">
            <div class="col-2 ur he job" id="job-1">
              Academic Advisor
            </div>
            <div class="col-2 hcps k12 job" id="job-2">
              Teacher
            </div>
            <div class="col-1 bgc k12 job" id="job-3">
              Club Mngr.
            </div>
            <div class="col-2 k12 hcps">
              Instructional Tech.
            </div>
            <div class="col-1 he ur">
              Tech Liaison
            </div>
            <div class="col-2 k12 hcps">
              Staff Dev
            </div>           
             <div class="col-2 k12 hcps">
              Asst. Dir. Inst. Tech.
            </div>       
          </div>
        </div>
      </div>
    </div>
    <div class="col-sm-6">
      <div class="row">
        <div class="col-1 year">
          '12
        </div>
        <div class="col-1 year">
          '13
        </div>
        <div class="col-1 year">
          '14
        </div>
        <div class="col-1 year">
          '15
        </div>
        <div class="col-1 year">
          '16
        </div>
        <div class="col-1 year">
          '17
        </div>
        <div class="col-1 year">
          '18
        </div>
        <div class="col-1 year">
          '19
        </div>
        <div class="col-1 year">
          '20
        </div>
        <div class="col-1 year">
          '21
        </div>
        <div class="col-1 year">
          '22
        </div>
        <div class="col-1 year">
          '23
        </div>
      </div>
      <div class="row">
        <div class="col-sm-12">
          <div class="row">
             <div class="col-1 k12 hcps" id="none">
            </div> 
            <div class="col-6 hcps he">
              Assoc. Director<br>Learning Innovation
            </div>
            <div class="col-1">
            </div>
            <div class="col-1">
            </div>
            <div class="col-1">
            </div>
            <div class="col-1">
            </div>
            <div class="col-1">
            </div>            
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="container-fluid">
  <div class="row">
    <div class="col-md-8" id="content">
      content
    </div>
    <div class="col-md-4" id="content-img">
    </div>
  </div>
</div>
            
          
!
            
              body {
  width: 80%;
  margin: 0 auto;
}

.job {
  cursor: pointer;
}

.col-1 {
  border-left: 1px solid;
  padding: 5px 5px 5px 2px;  
}

.first-date {
  border-left: 1px solid #424242;
}

.year {
  background-color: #424242;
  color: #fff;
}

.ur, .hcps, .bgc {
  border-left: 1px solid;
  font-size: .7em;
  padding: 5px 5px 5px 2px; 
}

.he {
  background-color: rgba(122,23,23,.2);
}

.k12 {
  background-color: rgba(2,23,23,.2);
}

#content {
    background-color: rgba(22,23,23,.1);
}

#none {
  border: none;
}

#content-img {
  border: 1px solid red;
}

#content-img {
  background-image: url('https://c1.staticflickr.com/5/4670/39821257421_d10d15d744_n.jpg');
  height: 300px;
  background-size: cover;
}
            
          
!
            
              const data = [{
  'title':'Academic Advisor',
  'img':'https://c1.staticflickr.com/5/4678/39227582114_9784f2dbf5_m.jpg',
  'url':'http://google.com',
  'description':'Here is text describing things. It is good and important text.'
},
{
  'title':'Teacher',
  'img':'https://c1.staticflickr.com/5/4710/28152321039_68e62afc9a_m.jpg',
  'url':'http://cnn.com',
  'description':'Hi there. Here is text describing things. It is good and important text.'
},
              {
  'title':'Club Manager',
  'img':'https://c1.staticflickr.com/5/4709/39789445172_e1bd1ee335_m.jpg',
  'url':'http://cnn.com',
  'description':'And yet again . . . Here is text describing things. It is good and important text.'
} 
             ];

var jobs = document.querySelectorAll('.job');
console.log(jobs);

for (i=0; i < jobs.length; i++){
  setContent(i, data);
}

function setContent (id, data){
  document.getElementById("job-"+(id+1)).addEventListener("click", function(){
      document.getElementById("content").innerHTML = '<h2>'+data[id].title+'</h2>'+data[id].description;
     document.getElementById("content-img").style.backgroundImage = "url("+data[id].img+")";
  });
}
            
          
!
999px
Loading ..................

Console