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

              
                <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>

<form  action="" method="post">
					<div id="contact-form">
						<div>
							<label for="fio" class="label">Ваше имя</label>
							<input type="text" value="" name="fio" id="fio" class="w-460" />
							<p id='err_fio' class='error'></p>
						</div>
						<div>
							<label for="phone" class="label">Телефон</label>
							<input type="text" value="" name="phone" id="phone" class="w-460" />
						</div>
						
						<a onclick="return checkForm(this);" href="#clik" class="button-m" id="submit-form">Продолжить</a>
					</div>
				</form>
<div> dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
  dfgdfg<br>
</div>
<section id="clik" style="display:none;">
				
				<div  class="main">
					<p class="upsell"><span><b>Специальное предложение</b></span></p>
					<!-- Апселл №1 -->
					<div class="goods-item">
						<p class="goods-name">Специальный пинцет</p>
						<img src="img/pincet.jpg" alt="MAGNETIC LASHES накладные ресницы">	
						<p class="goods-param">Нужен для упрощения процесса одевания ресниц</p>
						<p class="goods-price"><span>100 грн</span> 50 грн/шт</p>
						<form id="form1" action="" >
							<input type="hidden" name="name" value="<?=$name?>"/>
							<input type="hidden" name="phone" value="<?=$phone?>"/>
							<input type="hidden" name="price" value="50"/>
							<input type="hidden" name="upsell_price" value="20"/>
							<input type="hidden" name="upsell1" value="Пинцет"/>
							<input type="hidden" name="n" value="<?=$n?>"/>
							<input type="submit" class="label-item" value="Добавить к заказу" />
						</form>						
					</div>	
					
					<!-- Апселл №2 -->
					<div class="goods-item">
						<p class="goods-name">Подводка-фломастер от Kylie</p>
						<img src="img/podvodka-2.jpg" alt="MAGNETIC LASHES накладные ресницы">	
						<p class="goods-param">Не растирается, держится долго<br> на глазах</p>
						<p class="goods-price"><span>120 грн</span> 65 грн/шт</p>
						<form id="form2" action="" >
							<input type="hidden" name="name" value="<?=$name?>"/>
							<input type="hidden" name="phone" value="<?=$phone?>"/>
							<input type="hidden" name="price" value="65"/>
							<input type="hidden" name="upsell_price" value="30"/>
							<input type="hidden" name="upsell2" value="Подводка"/>
							<input type="hidden" name="n" value="<?=$n?>"/>
							<input type="submit" class="label-item" value="Добавить к заказу" />
						</form>
					</div>				
				</div>
				<input type="submit" for="form" class="button-m"></input>
			</section>

              
            
!

CSS

              
                
              
            
!

JS

              
                	// Валидация формы
					function checkForm(form){
						if (document.getElementById('fio').value=="") {
							document.getElementById('err_fio').innerHTML='Введите имя';
							return false;
						};
						if ($(clik).css('display') == 'none') {
							$(clik).animate({
								height: 'show'
							}, 500);
							$(clik).animate({
								scrollTop: $(clik).offset().top
							}, 800);
							} else {
							$(clik).animate({
								height: 'hide'
							}, 500);
						}
					};
              
            
!
999px

Console