This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Vanilla Javascript DropDown Menu Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="menu-dropdown">Menu ▼</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple Contact form using Jquery Ajax & PHP | |
http://www.otallu.com/tutorials/simple-contact-form-using-jquery-ajax-php/ | |
----------------------------------------------------- | |
HTML | |
----------------------------------------------------- | |
<form method="post" class="myform" action="process-form.php"> | |
<input type="text" name="name" placeholder="Your Name" required><br> | |
<input type="email" name="email" placeholder="Your Email" required><br> | |
<textarea rows="4" cols="20" name="message" placeholder="Your Message"></textarea><br> | |
<input type="submit" name="send" value="Send"> <span class="output_message"></span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/-----------------FORM-------------------------------------------------------------------------------------------------- | |
<div id="form-content"> | |
<form method="post" id="reg-form" autocomplete="off" onsubmit="document.getElementById('myButton').disabled=true; document.getElementById('myButton').value='Submitting, please wait...';"; > | |
<div class="form-group"> | |
<input type="text" class="form-control" name="txt_fullname" id="lname" placeholder="Full Name" required /> | |
</div> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$to = "[email protected]"; | |
$from = $_REQUEST['email']; | |
$name = $_REQUEST['name']; | |
$headers = "From: $from"; | |
$subject = "You have a message sent from your site"; | |
$fields = array(); | |
$fields{"name"} = "name"; | |
$fields{"email"} = "email"; | |
$fields{"phone"} = "phone"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#reg-form').submit(function(e){ | |
e.preventDefault(); // Prevent Default Submission | |
$('form :submit').prop('disabled', true); // disable submit button | |
$.ajax({ | |
// ajax source | |
}) | |
.done(function(data){ | |
$('form :submit').prop('disabled', false); // enable submit button | |
}) | |
.fail(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keymap (Windows Users): | |
[ | |
{ "keys": ["alt+shift+f"], "command": "reindent" }, | |
] | |
Settings: | |
{ | |
"show_definitions": false, | |
"auto_complete": false, | |
"bold_folder_labels": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-font-size(value) { | |
font-size: value; /* добавляем PX как подстраховку */ | |
if (value is inherit) { | |
/* делаем если нет значения для шрифта */ | |
} else { | |
font-size: remify(value); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 |