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
| $.urlParam = function(name) { | |
| var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); | |
| if(!results) { | |
| return 0; | |
| } | |
| return results[1] || 0; | |
| } |
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 supports = (function() { | |
| var div = document.createElement('div'), | |
| vendors = 'Khtml Ms O Moz Webkit'.split(' '), | |
| len = vendors.length; | |
| return function(prop) { | |
| if(prop in div.style) { | |
| return true; | |
| } |
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 maxHeight = 0; | |
| $("div.col").each(function() { | |
| if($(this).height() > maxHeight) { | |
| maxHeight = $(this).height(); | |
| } | |
| }); | |
| $("div.col").height(maxHeight); |
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
| $(document).ready(function() { | |
| $(".thumbs img").fadeTo("slow", 0.6); //This sets the opacity of the thumbs to fade down to 60% when the page loads | |
| $(".thumbs img").hover(function() { | |
| $(this).fadeTo("slow", 1.0); //This should set the opacity to 100% on hover | |
| }, function() { | |
| $(this).fadeTo("slow", 0.6); //This should set the opacity back to 60% on mouseout | |
| }); | |
| }); |
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($) { | |
| var cache = []; | |
| $.preLoadImages = function() { | |
| var argsLen = arguments.length; | |
| for(var i = argsLen; i--;) { | |
| var cacheImage = document.createElement('img'); | |
| cacheImage.src = arguments[i]; |
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
| <?php | |
| function wordCount($text) { | |
| $words = explode(" ", $text); | |
| return count($words); | |
| } | |
| $words = wordCount("Welcome to code.jobs"); | |
| print $words; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>jQuery Hello World</title> | |
| <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>My first web page</title> | |
| </head> | |
| <body> | |
| <h1>My First Heading</h1> | |
| <p>My first paragraph.</p> |
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
| #include <iostream> | |
| using namespace std; | |
| void main() { | |
| cout << "Hola Mundo!" << endl; | |
| } |
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
| #!/bin/bash | |
| echo "Hola Mundo!" |