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.


                <button onclick="popup1()">Open popup 1</button>

<p>z-index autocomplete is fixed in css code (1000) when popup1 is open, autocomplete work fine.<br>
  But if close autocomplete clicking in popup1, move popup1 or open popup 2; z-index autocomplete is bad (under
  dialogs)... because in all this actions z-index of ui-dialog changed to zIndexMax + 1 (more of 1000).
<p>It can fixed when autocomplete open (parent z-index + 1 for example)</p>

<div id="dialog" class="dialog" title="Popup 1" style="display: none;">
  <div class="ui-widget">
    <label for="search">Search "o": </label>
    <input id="search" />
    <button onclick="popup2()">Open popup 2</button>
<div id="dialog2" class="dialog" title="Popup 2" style="display: none;">
  <div class="ui-widget">
    <label for="search2">Search "o" 2: </label>
    <input id="search2" />


                .ui-autocomplete {
  z-index:1000; /* fix z-index */
  background: aquamarine;



                //fix autocomplete (uncoment code)
$.widget("ui.autocomplete", $.ui.autocomplete, {
	options: {
		open: function (event, ui) {
			var $input = $(;
			var $results = $input.autocomplete("widget");
			var zIndexParent = parseInt($input.closest('.ui-dialog').css('z-index'));
			$results.css('z-index', zIndexParent + 1 );

$( "#search" ).autocomplete({source: [ "one", "two", "three","one2","one3","one4" ]});
$( "#search2" ).autocomplete({source: [ "one", "two", "three","one2","one3","one4" ]});

function popup1(){

function popup2(){