View funny
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct
View hideHeader.js
$(window).scroll(function() {
if ($(this).scrollTop() > 200) {
$('#menu').css('display', 'none');
} else {
$('#menu').css('display', 'block');
}
});
View ajaxNode.js
var http = require('http');
var server = http.createServer(function (request, response) {
function funcOne(input) {
var request = require('request');
request.get('http://estruturaorganizacional.dados.gov.br/id/unidade-organizacional/1930',
{json: true, body: input},
function(err, res, body) {
if (!err && res.statusCode === 200) {
console.log(err);
View api.js
$.ajax({
method: 'GET',
url: 'https://api.github.com/repos/servicosgovbr/cartas-de-servico/contents/cartas-servico/v3/servicos'
}).then(function(data) {
var servicos = data;
});
View gist:61da14a9e1face560927
setInterval([].forEach.bind($$("*"),function(a){a.style.outline="5px solid #"+(~~(Math.random()*(1<<24))).toString(16) }, 5), 10)
View animate-intro.css
-webkit-animation-name: intro-right;
-webkit-animation-duration: 0.5s;
-webkit-animation-iteration-count: once;
-webkit-animation-timing-function: ease-out;
-webkit-animation-delay: 0s;
-webkit-animation-fill-mode: both;
-webkit-animation-name: intro-left;
-webkit-animation-duration: 0.5s;
-webkit-animation-iteration-count: once;
View registrationExample.html
<span>
<p>
<label>
Address
</label>
<input type="text" id="address1" name="address1" value="" size="73">
</p>
<p>
<label>
View oo.js
//When using "new" keywork we are bounding the "this" context object to the variable that are being returned implicit in the function.
//When we overrite the return function we don't need to use the "new" keyword
//revealing module mode, functions outside the return code
function test1() {
function x(val) {
return 'test' + val;
}
return {
View color
$('body').mousemove(function(event) {
var width = $('body').width(),
height = $('body').height(),
axisX = event.pageX,
axisY = event.pageY;
var hue = Math.floor(axisX / width * 360),
saturation = Math.floor(axisY / height * 100),
lightness = Math.floor(axisY / height * 100);
View shadow.css
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15);