Skip to content

Instantly share code, notes, and snippets.

View o-nasteka's full-sized avatar
🏠
Working from home

Oleg Nasteka o-nasteka

🏠
Working from home
View GitHub Profile
@o-nasteka
o-nasteka / safari.js
Created November 20, 2015 21:45
required input Safari
<script type="text/javascript">
function checkForm(){
var forms = document.getElementsByTagName('form');
for (var i = 0; i < forms.length; i++) {
forms[i].noValidate = true;
forms[i].addEventListener('submit', function(event) {
//Prevent submission if checkValidity on the form returns false.
if (!event.target.checkValidity()) {
event.preventDefault();
ul {
padding: 0;
margin: 0;
}
li {
display: inline;
position: relative;
}
ul ul {
position: absolute;
//Цели для Яндекс.Метрики и Google Analytics
$(".count_element").on("click", (function() {
ga("send", "event", "goal", "goal");
yaCounterXXXXXXXX.reachGoal("goal");
return true;
}));
@o-nasteka
o-nasteka / 0_reuse_code.js
Created October 25, 2015 14:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console