Skip to content

Instantly share code, notes, and snippets.

View vitaliykononov's full-sized avatar

Vitaliy Kononov vitaliykononov

View GitHub Profile
@vitaliykononov
vitaliykononov / LICENSE
Last active August 29, 2015 14:27 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@vitaliykononov
vitaliykononov / youtubeinfo
Last active December 20, 2022 09:17
Get Youtube info
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
<script type= "text/javascript">
function getYouTubeInfo() {
$.ajax({
url: "http://gdata.youtube.com/feeds/api/videos/<?php echo $_GET['v']; ?>?v=2&alt=json",
dataType: "jsonp",
success: function (data) { parseresults(data); }
});
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
@vitaliykononov
vitaliykononov / iphone5c-scroll.js
Created September 20, 2013 13:45
Apple Iphone like slider effect with the JQuery Mousewheel Plugin and scrollTo http://www.apple.com/iphone-5s/
var isScrolling = false;
$('.container').mousewheel(function (event, delta) {
if (!isScrolling) {
isScrolling = true;
if (delta < 0) {
if ($next = $('#navbox').find('.active').next('li').children('a').attr('href')) {
$('.container').scrollTo($next, {
offset: 0,
duration: 1000,