Skip to content

Instantly share code, notes, and snippets.

View ki11ua's full-sized avatar

Georgios Papadimitrou ki11ua

  • the world is my playground
View GitHub Profile
@ki11ua
ki11ua / Super simple background image slideshow.css
Last active November 29, 2018 18:53 — forked from mhulse/Super simple background image slideshow.css
Super simple jQuery background-image serial slideshow (using CSS3 for the transition and gets the image paths via HTML5 `data` attribute).
[data-slides] {
background-image: url(../../uploads/banner1.jpg); /* Default image. */
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
-webkit-transition: all 0.7s ease;
-moz-transition: all 0.7s ease;
-ms-transition: all 0.7s ease;
-o-transition: all 0.7s ease;
transition: all 0.7s ease;
@ki11ua
ki11ua / biss.css
Last active April 2, 2016 12:53
Background Image Simple Slideshow using CSS3 + jQuery Multiple from HTML5 data element with variable transition time + onload image.
.img{
height: 100%;
background-image: url('img/content/slide1.jpg');
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
-webkit-transition: all 1.2s ease;
-moz-transition: all 1.2s ease;
-ms-transition: all 1.2s ease;
-o-transition: all 1.2s ease;
@ki11ua
ki11ua / SuperSimpleWeather.css
Last active April 23, 2016 06:58
Super Simple JQuery Weather Widget
.weatherfeed{
color: rgba( 255, 255, 255, 1);
text-align: right;
font-size: 16px;
max-width:350px;
line-height: 1.43em;
background-position: 25% -50%;
background-repeat: no-repeat;
}
@ki11ua
ki11ua / current.js
Created September 26, 2016 05:52
current window height width state func
function isTouchDevice(){
return true == ('ontouchstart' in window || window.DocumentTouch && document instanceof DocumentTouch);
}
function current() {
var state='click';
if(isTouchDevice()===true) {
state='touchstart';
}
return {h : Math.max(document.documentElement.clientHeight, window.innerHeight || 0), w: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),scroll:(window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0),state:state};
}
@ki11ua
ki11ua / map.js
Created June 9, 2017 05:43
multiple markers map async and only when #map exists
jQuery(window).on('load', function () {
if(jQuery("#map").length){
loadMap();
}
});
function loadMap() {
var script = document.createElement('script');
script.defer = true;
@ki11ua
ki11ua / bootstrap_modal_fixed.css
Created November 29, 2017 11:11
Fix for jump on top ( Bootstrap Modal - Fixed 100% height + width)
html{
overflow-x: hidden
}
body.modal-open{
overflow: visible !important
padding-right: 0 !important
}
.modal.full-size {
"use strict";
/* A version number is useful when updating the worker logic,
allowing you to remove outdated cache entries during the update.
*/
var version = 'v1::';
/* These resources will be downloaded and cached by the service worker
during the installation process. If any resource fails to be downloaded,
then the service worker won't be installed either.
@ki11ua
ki11ua / istouch.js
Created January 31, 2018 07:15
Test forf Touch Device
function isTouchDevice(){
return true == ("ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch);
}
if(!isTouchDevice() && window.outerWidth > 1199){
}
@ki11ua
ki11ua / slice-slider.css
Last active May 25, 2020 00:31
Slice Slider with Interval
.slides-nav {
z-index: 99;
position: fixed;
right: -5%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
@ki11ua
ki11ua / yahoo_exchange_rates_jsonp.html
Created February 7, 2018 11:46 — forked from henrik/yahoo_exchange_rates_jsonp.html
JavaScript to get currency exchange rates from Yahoo Finance as JSONP. No XHR!
Get exchange rate as JSONP via YQL.
YQL Console: http://developer.yahoo.com/yql/console
Query (USD to SEK): select rate,name from csv where url='http://download.finance.yahoo.com/d/quotes?s=USDSEK%3DX&f=l1n' and columns='rate,name'
Example code:
<script type="text/javascript">