This file contains 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
var url = window.location.href; | |
url = url.substr(url.lastIndexOf("/") + 1); | |
$("#nav").find("a[href='" + url + "']").addClass("current"); | |
if(url == ''){ | |
$("#nav").find("a[href='index.php']").addClass("current"); | |
} |
This file contains 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
function maxHeight(selected){ | |
var current = 0, max = 0; | |
$(selected).each(function(){ | |
current = $(this).height(); | |
max = Math.max(current, max); | |
}); | |
$(selected).height(max); | |
} |
This file contains 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
window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
This file contains 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
x('4'); | |
function x(i){ | |
if(typeof i === 'undefined'){ | |
console.log('i : undefined'); | |
}else{ | |
console.log('i : ' + i); | |
console.log('typeof ' + typeof i); | |
} | |
} |
This file contains 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
function resetFunction(){ | |
$('html, body').animate({scrollTop:0}, 1500, 'easeOutQuint'); | |
} |
This file contains 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
$(document).ready(function () { | |
$('#plane').hide().delay(500).fadeIn(1000); | |
}); |
This file contains 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
<? | |
// start{ | |
// exec time | |
$start_time = (float) array_sum(explode(' ', microtime())); | |
// } | |
// config file { | |
// developer mode on/off | |
define('DEV_MODE', true); |
This file contains 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 | |
// sample title | |
$title = "the, *t.ru/e ;h'or']ror} (2)3!@ # $ % ^ & (* )^ ) _+-0(*)*%(&!^"; | |
// find and replace any whitespace characters with underscores | |
$excerpt = preg_replace('/\s/', '_', $title); | |
// find an replace any none alphanumeric or underscore characters with any empty string '' | |
$excerpt = preg_replace('/[^a-zA-Z0-9_]/', '', $excerpt); | |
// while there is a '__' string inside the string, keep replacing the '__' with '_' | |
while (strpos($excerpt, '__') !== false){ |
This file contains 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 | |
// CONTINUE: | |
// CLASSES & OBJECTS - http://php.net/manual/en/language.oop5.php | |
// BASICS (TUTORIAL) - http://www.php.net/manual/en/language.oop5.basic.php | |
// CONSTRUCTORS - http://www.php.net/manual/en/language.oop5.decon.php | |
// new class | |
class Foo{ | |
// constructor |
This file contains 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 | |
$temp = array('one', 'two', 'three', 'four'); | |
list($one, $two, $three, $four) = $temp; | |
var_dump($temp); | |
var_dump($one, $two, $three, $four); | |
// RESULTS | |
/* |
OlderNewer