Skip to content

Instantly share code, notes, and snippets.

View sealucky7's full-sized avatar

sea-lucky sealucky7

  • My Life :)
View GitHub Profile
Напишите код, который:
Запрашивает по очереди значения при помощи prompt и сохраняет их в массиве.
Заканчивает ввод, как только посетитель введёт пустую строку, не число или нажмёт «Отмена».
При этом ноль 0 не должен заканчивать ввод, это разрешённое число.
Выводит сумму всех значений массива
----------------------------------------------------------------------------------------------------------------------
var arrNumber = [];
$("body").click(function(e) {
if($(e.target).closest("your menu and button").length === 0) {
$(".burger-menu").slideUp(400);
}
});
<form>
<input type="text" name="company_name" oninvalid="this.setCustomValidity('Your error message')" required />
<input type="submit">
</form>
<header class="section header" data-color="dark">
<div class="top_head">fixed</div>
</header>
<section class="section section-first" data-color="light"></section>
<section class="section section-second" data-color="dark"></section>
<section class="section section-first" data-color="light"></section>
$(function() {
<div class="button-inner-container">
<div class="button-inner-mask"></div>
<div class="button-block">
<div class="button-pulse button-pulse-animate"></div>
<div class="button-inner-block">
<div class="button-icon-container">
<div class="button-inner-item button-icon-animation">
<svg class="button-icon" xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 28">
<path class="webform-icon" fill="#FFFFFF" fill-rule="evenodd" d="M815.406703,961 L794.305503,961 C793.586144,961 793,961.586144 793,962.305503 L793,983.406703 C793,984.126062 793.586144,984.712206 794.305503,984.712206 L815.406703,984.712206 C816.126062,984.712206 816.712206,984.126062 816.712206,983.406703 L816.712206,962.296623 C816.703325,961.586144 816.117181,961 815.406703,961 L815.406703,961 Z M806.312583,979.046143 C806.312583,979.454668 805.975106,979.783264 805.575462,979.783264 L796.898748,979.783264 C796.490224,979.783264 796.161627,979.445787 796.161627,979.046143 L796.16162
<div id="clockdiv">
<div id="days">
<span class="days"></span>
<div class="smalltext">Дней</div>
</div>
<div id="hours">
<span class="hours"></span>
<div class="smalltext">Часов</div>
</div>
<div id="minutes">
;(function($) {
$.fn.fixMe = function() {
return this.each(function() {
var $this = $(this),
$t_fixed;
function init() {
$this.wrap('<div class="container-table" />');
$t_fixed = $this.clone();
$t_fixed.find("tbody").remove().end().addClass("fixed").insertBefore($this);
resizeFixed();
<!-- HTML -->
<div class="file-attach">
<div class="attach-link">Прикрепить файл</div>
<div class="file-name">Выберите файл</div>
<input type="file" name="attachmentFile">
</div>
<!-- CSS -->
<a href="#elem">About</a>
<!------ Some text -------->
<div id="elem"></div>
<script>
$(document).ready(function() {
$('a').click( function(){ // ловим клик по ссылке с классом go_to
var scroll_el = $(this).attr('href'); // возьмем содержимое атрибута href, должен быть селектором, т.е. например начинаться с # или .
// Add var
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {