Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class='contentBG' style="position:relative;">

<div class="picItem d1" data-fruit="apple" style="position:absolute; top:45px; left: 100px;">
    <img width="50" height="50" src="http://us.123rf.com/400wm/400/400/chudtsankov/chudtsankov1208/chudtsankov120800002/14670247-cartoon-red-apple.jpg" />
</div>
<div class="picItem d1" data-fruit="pumpkin" style="position:absolute; top:367px; left: 760px;">
    <img width="50" height="50" src="http://www.in.gov/visitindiana/blog/wp-content/uploads/2009/09/pumpkin.gif" />
</div>
<div class="picItem d1" data-fruit="candle" style="position:absolute; top:245px; left: 300px;">
    <img width="50" height="50" src="http://upload.wikimedia.org/wikipedia/commons/f/fc/Candle_icon.png" />
</div>
<div class="picItem d1" data-fruit="pear" style="position:absolute; top:145px; left: 70px;">
    <img width="50" height="50" src="http://eg-img.com/wp-content/uploads/2014/08/pear.jpg" />
</div>
<div class="picItem d1" data-fruit="mouse" style="position:absolute; top:445px; left: 300px;">
    <img width="50" height="50" src="http://free.clipartof.com/57-Free-Cartoon-Gray-Field-Mouse-Clipart-Illustration.jpg" />
</div>
<div class="picItem d1" data-fruit="key" style="position:absolute; top:345px; left: 200px;">
    <img width="50" height="50" src="http://images.wisegeek.com/brass-key.jpg" />
</div>

<div class="listBox">
<h1 class="intro">Click on image causes a strike through of word and fades out image.	<br />
<span style="color:#666;">Need a hint? Click on the item in the list!</span></h1>
<div id="items">
	<ul>
    <li class="apple listItem">Apple</li>
    <li class="pumpkin listItem">Pumpkin</li>
    <li class="candle listItem">Candle</li>
    <li class="pear listItem">Pear</li>
    <li class="mouse listItem">Mouse</li>
    <li class="key listItem">Key</li>
</ul>
</div>
<div class="someText">Reveal message after finding all the objects!
</div>
<div class="deal">You must have found all the thingz! WIN</div>

</div>

</div>
</div>
              
            
!

CSS

              
                /* test deal */
.contentBG { 
  display:inline-block; 
  vertical-align:middle; 
  width:1280px; 
  height:926px; 
  margin:0; 
  background:#000; 
  position:relative; }

.listBox {
  width:800px;
  background:#fff;
  margin: 0 auto;
  position: absolute;
  top: 500px;
left: 410px;
}

.intro, .someText {
    color:#333;
    font-size:16px;
    font-weight: bold;
}
p {
	font-size:14px; 
  line-height:20px;
}
.deal {
    font-size: 18px;
    color: red;
}

              
            
!

JS

              
                /*----------------------------------------------------------
	Hidden object onClick fadeOut strikethrough and show deal
-----------------------------------------------------------*/
$(document).ready(function () {

    var click = {
            deal1: [0, 5],
        },
        $picItem = $('.picItem');

    $('.deal').hide();

    $picItem.on('click', function () {
        var $this = $(this),
            $fruit = $this.data('fruit');

        $this.fadeOut('slow');

        if ($this.hasClass('d1') && !$this.hasClass('clicked1')) {
            if (click.deal1[0] < click.deal1[1]) {
                click.deal1[0]++;
                $(this).addClass('clicked1');
            } else {
                $('.deal').show();
            }
        }

        $('.' + $fruit).wrap("<strike>");
    });

   
/*----------------------------------------------------------
	Hint onClick of object name show animation along SVG path
-----------------------------------------------------------*/



     



});
              
            
!
999px

Console