Skip to content

Instantly share code, notes, and snippets.

View varemenos's full-sized avatar

Adonis Kakoulidis varemenos

View GitHub Profile
@varemenos
varemenos / opening_fade.js
Created March 1, 2012 19:14
jQuery - Opening fade
$(document).ready(function () {
$('#plane').hide().delay(500).fadeIn(1000);
});
@varemenos
varemenos / back2top.js
Created March 1, 2012 19:11
jQuery - Back to Top
function resetFunction(){
$('html, body').animate({scrollTop:0}, 1500, 'easeOutQuint');
}
@varemenos
varemenos / optparam.js
Created February 27, 2012 03:53
jQuery - Optional parameters and typeof variable
x('4');
function x(i){
if(typeof i === 'undefined'){
console.log('i : undefined');
}else{
console.log('i : ' + i);
console.log('typeof ' + typeof i);
}
}
@varemenos
varemenos / url_params.js
Created February 20, 2012 08:38
jQuery - get url parameters
window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
@varemenos
varemenos / widgetHeight.js
Created January 28, 2012 02:23
jQuery - calculate max widget height
function maxHeight(selected){
var current = 0, max = 0;
$(selected).each(function(){
current = $(this).height();
max = Math.max(current, max);
});
$(selected).height(max);
}
@varemenos
varemenos / currentLink.js
Created January 28, 2012 02:21
jQuery - find current page