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 id="filter" class="servicemenu">
  <a href="#" id="cp">COMMON PESTS</a>
  <a href="#" id="rc">RODENT CONTROL</a>
  <a href="#" id="b">BEE &amp; WASP CONTROL</a>
  <a href="#" id="f">FLY CONTROL</a>
  <a href="#" id="m">MOSQUITO CONTROL</a>
  <a href="#" id="r">REPTILE CONTROL</a>
  <a href="#" id="w">WILDLIFE CONTROL</a>
  <a href="#" id="t">TERMITES &amp; WDO's</a>
  <a href="#" id="l">LAWN &amp; ORNAMENTAL</a>
  <a href="#" id="o">OTHER SERVICES</a></div>

<div id="list" class="prolist">
  <li class="item cp t">common and termites</li>
  <li class="item b rc">bees and rodents</li>
  <li class="item t f">termites and flies</li>
  <li class="item t">termites</li>
  <li class="item t l m">termites, lawn, and mosq.</li>
  <li class="item m r">mosquitoes and rodents</li>
  <li class="item rc r">rodents and reptiles</li>
  <li class="item w l">wildlife and lawn</li>
  <li class="item b f">bees and flies</li>
  <li class="item m r w">mosq., rept., and wildlife</li>
  <li class="item l">lawn</li>
  <li class="item cp b">common and bees</li>
  <li class="item cp">common</li>
  <li class="item cp l t r w rc b f m">all</li>
  <li class="item t cp">termites and common</li>
  <li class="item b">bees</li>
  <li class="cover">
    <div class="coverb"></div>
    <div class="coverm">
      <h2 style="font-size: 34px">&lt;&lt;&lt;&nbsp; Pest Control Services</h2></div></li></div>
              
            
!

CSS

              
                .servicemenu {
position: absolute;
top: 50px;
left: 28px;
width: 196px;
padding: 5px 0px 5px 0px;
border-radius: 10px;
border: 4px solid #ff6600;
background: #ff6600;
box-shadow: 0px 0px 3px #222222, inset 0px 0px 4px #010101;}

.servicemenu a{
display: block;
float: left;
font-weight: bold;
color: #162252;
text-align: center;
font-size: 12px;
height: 30px;
line-height: 32px;
margin-left: 6px;
width: 182px;
border-top: 1px solid #ffbb00;
border-bottom: 1px solid #ff6600;
background: #ff6600;
background: linear-gradient(left, #ff6600 0%, #ffbb00 50%, #ff6600 100%);
background: -o-linear-gradient(left, #ff6600 0%, #ffbb00 50%, #ff6600 100%);
background: -moz-linear-gradient(left, #ff6600 0%, #ffbb00 50%, #ff6600 100%);
background: -webkit-linear-gradient(left, #ff6600 0%, #ffbb00 50%, #ff6600 100%);
background: -ms-linear-gradient(left, #ff6600 0%, #ffbb00 50%, #ff6600 100%);}

.servicemenu a:hover{
color: #ffffff;
background: #dd4400;
background: linear-gradient(left, #ff6600 0%, #dd4400 50%, #ff6600 100%);
background: -o-linear-gradient(left, #ff6600 0%, #dd4400 50%, #ff6600 100%);
background: -moz-linear-gradient(left, #ff6600 0%, #dd4400 50%, #ff6600 100%);
background: -webkit-linear-gradient(left, #ff6600 0%, #dd4400 50%, #ff6600 100%);
background: -ms-linear-gradient(left, #ff6600 0%, #dd4400 50%, #ff6600 100%);}

.servicemenu a img{
float: left;
margin: 3px 2px 3px 6px;}

.prolist{position: absolute; width: 739px; top: 20px; left: 280px;}

.prolist li{list-style: none; height: 100px; width: 210px;}

.prolist li.item{position: relative; display: inline;float: left;}

.prolist li.cover{
position: absolute;
top: 0px;
left: 0px;
margin: -20px;
height: 475px;
width: 739px;}

.coverb{
position: absolute;
top: 0px;
left: 0px;
height: 475px;
width: 739px;
border-radius: 10px;
background: #000000;
opacity: .8;}

.coverm{
position: absolute;
margin-top: 180px;
width: 739px;
text-align: center;}

#lpic{
position: relative;
height: 64px;
width: 210px;
margin: 11px 11px 11px 11px;
overflow-x: visible;
overflow-y: visible;}

.lbox{height: 64px; width: 210px;}

.pro{width:190px;}

.proview{
left: 188px;
width: 190px;
              
            
!

JS

              
                $(document).ready(function(){
var n = $('.item').length;

// shows default if no list items present
if (n < 1) {$('#nopestprofessional').removeClass('tab').addClass('tab1');}

else {

// shows first 15 list items only
$('li:gt(15)').hide();

// displays translucent "cover" over list items
$('.cover').show();}

$('#filter a').click(function(e){
e.preventDefault();

var filter = $(this).attr('id');

// shows relevant list items
$('#list li').show();

// hides non-relevant list items
$('#list li:not(.' + filter + ')').hide();

// my attempt to show default, if there are no list items in the **filtered** list. The
// bottom anchor "OTHER SERVICES" on the left menu returns no items in the link
// below.)
var l = $('#list li').length;

// If I change the 1 to 20, the default shows, which tells me the original unfiltered
// list items are being counted.
if (l < 1) {$('#nopestprofessional').removeClass('tab').addClass('tab1');}
});
});
              
            
!
999px

Console