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

              
                <!--Modal win-->
<div data-jc="form" data-jc-id="win" id="win" data-jc-path="win.view" data-jc-config="if:true;width:600;title:Заголовок;submit:modal_save;esc:true;autofocus:true" class="hidden">
    <div style="padding:10px">  
        <div class="form-group">        	    	        	    
            <div data-jc="textbox" data-jc-path="win.form.title" data-jc-config="placeholder:Заголовок;class:form-control;required:true;maxlength:100">Заголовок</div>
        </div>    
       	<div class="form-group">        	    	        	    
            <div data-jc="textarea" data-jc-path="win.form.body" data-jc-config="placeholder:Сообщение;class:form-control;required:true;maxlength:300">Сообщение</div>
       	</div>
       	<div class="form-group">        	    	        	    
           <div style="width:200px;" data-jc="dropdown" data-jc-path="win.form.expire" data-jc-config="items:3 мин|180,10 мин|600,30 мин|1800,1 час|3600,5 часов|18000,10 часов|36000,1 день|8640;class:form-control;">Время жизни сообщения</div>
       	</div>
	<div class="ui-form-buttons">
            <button name="cancel"><i class="fa fa-remove"></i> Отменить</button>
            <button name="submit"><i class="fa fa-check" aria-hidden="true"></i> Сохранить</button>
        </div>
    </div>    
</div>
<!--/Modal win-->
<div class='container' style='margin-top: 20px;'>
  <div class='row'>
    <div class='col-md-6 center-block' style='float:none'>
	    <div class="panel panel-default" style='margin: 20px 0; padding:10px;'>
	        <h4>Модальное окно<br><small>Используются компоненты: j-Textbox, j-Dropdown, j-Form</small></h4>	
	   <div class="form-group text-center" style='margin-top: 20px;'>
              <button data-bind="null__click:view_modal" class='btn btn-default btn-sm'>Открыть модальное окно</button>
           </div>  
      </div>        
    </div>     
  </div>       
</div>
              
            
!

CSS

              
                /*MAIN CSS*/                                  
body {background-color: #eee;}
.mb10 {margin-bottom: 10px;}
              
            
!

JS

              
                //вызов модального окна
function view_modal() {  
  SET('win.view', true); 
}
//закроем окно и выведем резульата
function modal_save() {  
  SET('win.view', false); 
  alert(JSON.stringify(win.form));  
  console.log(win.form); 
}

                                  
                                  
                               
              
            
!
999px

Console