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


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


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.


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.


  <option value="url-change">[ jQuery ]URLの一部を変更</option>
  <option value="detach">[ jQuery / .detach() ]イベント・ハンドラを残して要素を削除</option>
  <option value="empty">[ jQuery / empty ]子要素・内容を削除</option>
  <option value="remove">[ jQuery / remove ] 要素を削除</option>

  <a href="" target="_blank"><img src=""></a>


                select {
  width: 390px;
  height: 30px;
  margin: 10px; 

div {display: none;}

div a {
  width: 400px;
  margin: 20px 0 0;
  display: block;

div img {width: 400px;}

div span {
  width: 400px;
  text-align: center;
  display: block;


      // 画像URL取得
      var opval = $(this).val(); 
      var imgSplit = $('div img').attr('src').split('/');
      var imgName = imgSplit[7].split('.');
      var imgUrl = $('div img').attr('src').replace(imgName[0] , opval);
      $('div img').attr('src', imgUrl); 
      // リンク取得
      var aSplit = $('div a').attr('href').split('/');
      var aUrl = $('div a').attr('href').replace(aSplit[5] , opval);
      $('div a').attr('href', aUrl);
      // タイトル取得
      var str = "";
      $("select option:selected").each(function () {
          str += $(this).text() + " ";
      $("div span").text(str);
      // 表示する
      $('div').css('display' , 'block');