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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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 = "row"><div class = "col-md-6 col-md-offset-3">
      For each of the function equations given below:
      <ul>
        <li>Sketch a graph of the function on the axes</li>
        <li>Clearly identify any axes intercepts on your sketch.</li>
        <li>Clearly draw any asymptotes that exist for the function.</li>

      </ul>
    </div>
  </div>

      <div class = "row"><div class = "col-md-10 col-md-offset-1">
    <div id="container" class = "container">




    </div>
  </div>
</div>
            
          
!
            
              
    .bordered{
      border: black 1px solid;
      border-radius:5px;
      height:446px;
      margin-top: 10px;
    }

            
          
!
            
              
    var library = ['x^2','sin(x)','cos(x)','\\sqrt{x}','x^3','ln(x)','e^x','\\dfrac{1}{x}','x','|x|'];

    var shuffledLibrary = _.shuffle(library);

    var App = React.createClass({
      getInitialState:function(){

        return null;


      },
      render: function () {
        var quizElements = [];
        shuffledLibrary.forEach(function(f){

          quizElements.push(
            <div className = "col-md-5 col-xs-5 bordered">
            <FunctionView functionName = {f}/>
              </div>
          )

        })

        return (
          <div>
          <div className = "row">

              {quizElements}

          </div>

          </div>

        );
      }
    });

var FunctionView = React.createClass({
getInitialState:function(){

return {image_url:this.get_image_url(this.props.functionName)};


},
render:function(){

var html = {__html: katex.renderToString("f(x) = "+ this.props.functionName, { displayMode: true })};

return (

<div>
  <div className = "row">
    <div className = "col-md-12 col-xs-12 ">
      <img className = "img-responsive" src = {this.state.image_url}></img>



    </div>

  </div>

  <div className = "row">
    <div className = "col-md-12 col-xs-12">
      <div ref = "katex" dangerouslySetInnerHTML = {html}>

      </div>



    </div>

  </div>

  </div>

)

},
get_image_url:function(){

if(this.props.functionName=="sin(x)"|this.props.functionName=="cos(x)"){

  return "http://blog.evanweinberg.org/wp-content/uploads/2016/11/trig_axes.png";
}
return "http://blog.evanweinberg.org/wp-content/uploads/2016/11/reg_axes.png"

}



});


ReactDOM.render(
        <App />,
        document.getElementById('container')
      );

            
          
!
999px
Loading ..................

Console