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
$ -> | |
$('#formId').validate | |
rules: { | |
'message[name]': "required" | |
'message[email]': 'required' | |
'message[subject]': 'required' | |
'message[body]': 'required' | |
} | |
submitHandler: (form) -> | |
$.post( |
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 preload(arrayOfImages) { | |
$(arrayOfImages).each(function(){ | |
$('<img/>')[0].src = this; | |
// Alternatively you could use: | |
// (new Image()).src = this; | |
}); | |
} | |
// Usage: |
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 mascara(o,f){ | |
v_obj=o | |
v_fun=f | |
setTimeout("execmascara()",1) | |
} | |
function execmascara(){ | |
v_obj.value=v_fun(v_obj.value) | |
} |
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
<input type="text" value="This text will expand" /> | |
<h2><span id="elem" class="overflow-300"></span> and this will shift to the side.</h2> | |
h2 span{ | |
font-weight:bold; | |
display:inline-block; | |
vertical-align: top; | |
} | |
.overflow-300{ |
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
a[accesskey]:after, button[accesskey]:after, input[accesskey]:after, | |
label[accesskey]:after, legend[accesskey]:after, textarea[accesskey]:after { | |
margin-left: 0.3em; | |
content: "[" attr(accesskey) "]"; | |
} |
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
// Mixin | |
@mixin font-face($name, $url) { | |
@font-face { | |
font-family: #{$name}; | |
src: url('#{$url}.eot'); | |
src: url('#{$url}.eot#iefix') format("embedded-opentype"), | |
url('#{$url}.ttf') format('truetype'), | |
url('#{$url}.svg##{$name}') format('svg'), | |
url('#{$url}.woff') format('woff'); | |
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 | |
$path = 'gallery/'; | |
$files = glob("$path{*.jpg,*.png,*.gif,*.jpeg}", GLOB_BRACE); | |
foreach($files as $img){ | |
?> | |
<img src="<?php echo $img; ?>" alt="Description"> | |
<?php } ?> |
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 ruleOfThree (had, got, have) { | |
return have * got / had; | |
} |
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 returnTheSameArguments(arg: number): number { | |
return arg; | |
} |
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 returnTheSameArguments<T>(param: T): T { | |
return param; | |
} | |
let showMessage = returnTheSameArguments("Qual conhecimento você compartilhou hoje?"); |
OlderNewer