This file contains hidden or 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(){ | |
$.input = function(elem){ | |
$(elem) | |
.val("*") | |
.keyup(function(){ | |
self = $(this); | |
inputValue = self.val(); | |
charPos = inputValue.indexOf("*"); | |
This file contains hidden or 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($){ | |
Class = function(elem){ | |
this.elem = elem; | |
this.$elem = $(elem); | |
}; | |
Class.prototype = { | |
init: function(){ | |
this.efeito(); | |
this.cachorrada(); |
This file contains hidden or 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($){ | |
Class = { | |
init: function(){ | |
this.each(function(){ | |
var $this = $(this); | |
$this.click(function(){ | |
$this.css('background-color', 'red'); | |
alert('oi') | |
}) | |
}); |
This file contains hidden or 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
Ext = {} | |
Ext.load = function(opt){ | |
try{ | |
self = $(opt); | |
self.click(function(){ | |
self.addClass('feio'); | |
alert('oi'); | |
}); | |
}catch(e){ |
This file contains hidden or 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
/*! | |
* jQuery JavaScript Library v1.7.1 | |
* http://jquery.com/ | |
* | |
* Copyright 2012, Rodrigo Nery | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* Copyright 2012, Rodrigo Nery | |
* Released under the MIT, BSD, and GPL Licenses. |
This file contains hidden or 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 Pessoa = (function(){ | |
var nome = 'John Smith'; | |
var idade = 30; | |
var updatePessoa = function(){ | |
nome = 'John Smith Updated'; | |
} | |
var setPessoa = function(){ |
This file contains hidden or 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(){ | |
$.options = (function(){ | |
var $self = $(this); | |
if ($self.val() === "add"){ | |
var $select = $self.closest("select"); | |
$select.hide(); | |
var $input = $("<input>").blur(function(){ | |
var $self = $(this); | |
var newVal = $.trim($self.val()); | |
if (newVal.length > 11) alert("Grande demais!"); |
This file contains hidden or 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 Class = (function(){ | |
var _private = { | |
i: 0, | |
get: function(){ | |
console.log('current value:' + this.i); | |
}, | |
set: function(val){ | |
this.i = val; |
This file contains hidden or 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 (win) { | |
win.hashchange(function () { | |
var page = location.hash + '_c'; | |
var $self = $(page); | |
if (page == '_c') { | |
page = '#home_c'; | |
} |
This file contains hidden or 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 Pessoa = Pessoa || {}; | |
(function (o) { | |
o.setName = function (val) { | |
this.name = val; | |
}; | |
o.setAge = function (val) { | |
this.Age = val; | |
} |
OlderNewer