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. 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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

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.

HTML

              
                <div id="article">
  <h1>新店市好吃的餐廳</h1>
  <ul class="restaurant">
    <li>可愛村便當:台北縣新店市大豐街8號</li>
    <li>阿輝現炒黃牛肉:台北縣新店市中興路三段225號</li>
    <li>黑人牛肉麵:台北縣新店市中興路三段176號</li>
    <li>蘇杭:台北縣新店市民權路25號2F</li>
    <li>王家包子:台北縣新店市國校路25號之1</li>
    <li>辣。四川成都小炒:台北縣新店市吉安路2-1號</li>
    <li>山東餃子館:台北縣新店市中央路133巷19號1樓</li>
    <li>樂陶然健康小火鍋:台北縣新店市中央五街2號</li>
    <li>六六火鍋:台北縣新店市中央路89號</li>
    <li>龍門客棧:台北縣新店市中央路98號之1</li>
    <li>麵對麵:台北縣新店市中央路33號</li>
  </ul>
</div>
              
            
!

CSS

              
                
              
            
!

JS

              
                YUI().use('node',"event", function (Y) {
        var module = Y.one("#article");

        Y.one("body").on("click", function (){
            alert("hi");
            });
       /*
         use delegate to prevent to much event add to li item, when items are a lot
        */
        module.delegate("click",function(e){
            
            //e.halt(); // this is used as the two following codes
            e.preventDefault();
            e.stopPropagation();
            var node = e.target;
            node.setContent(node.getContent()+"is clicked");
            node.addClass("highlighted");
            },"li");
    });
              
            
!
999px

Console