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 = "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