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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div class="container">
  <h2><a href="http://jaspreetchahal.org/jquery-text-highlighter-and-filter-plugin/" target="_blank">jcOnPageFilter</a> demo</h2>
  <div class="panel panel-default">
    <div class="panel-heading">
        <div class="form-group">
          <label for="keyword">Search term:</label>
          <input type="text" class="form-control input-sm" placeholder="Lorem" name="keyword" id="keyword">
    <div class="panel-body context">
      <div class="jcorgFilterTextParent">
        <h3>This is header 1</h3>
        <div class="jcorgFilterTextChild">Hac magnis? Ac dignissim nec! Phasellus aliquet magnis nisi, cursus. </div>
      <div class="jcorgFilterTextParent">
        <h3>This is header 2</h3>
        <div class="jcorgFilterTextChild">blah blah blah blah blah blah blah blah blah blah </div>
      <div class="jcorgFilterTextParent">
        <h3>This is header 3</h3>
        <div class="jcorgFilterTextChild">Lorem ipsum dolor sit</div>
      <div class="jcorgFilterTextParent">
        <h3>This is header 4</h3>
        <div class="jcorgFilterTextChild">consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et</div>
    <div class="panel-footer">This example is part of the article <a href="http://www.sitepoint.com/10-jquery-text-highlighter-plugins/" target="_blank">10 jQuery Text Highlighter Plugins</a> on <a href="http://sitepoint.com/" target="_blank">SitePoint</a> by <a href="https://github.com/julmot"
        target="_blank">Julian Motz</a>.</div>
              .context .jcorgFilterTextParent h3 {
  margin-top: 0;

.context .jcorgFilterTextParent {
  padding: 10px 0;

.context .jcorgFilterTextParent:not(:last-child) {
  border-bottom: 1px dashed #bdc3c7;

 * The following is not related to the plugin
body {
  background: #fbfcfc;

.container {
  max-width: 700px;

.form-group {
  margin-bottom: 5px;

.form-group:last-child {
  margin-bottom: 0;

.form-group label {
  display: block;
              $(function() {
  var $form = $("form");
  var $input = $form.find("input[name='keyword']");
    animateHideNShow: true,
    focusOnLoad: false,
    highlightColor: "yellow",
    textColorForHighlights: "#000000",
    caseSensitive: false,
    hideNegatives: true,
    parentLookupClass: "jcorgFilterTextParent",
    childBlockClass: "jcorgFilterTextChild"
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.