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
/* from HTML5 Boilerplate http://html5boilerplate.com/ */ | |
/* For image replacement */ | |
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } | |
.ir br { display: none; } | |
/* Hide for both screenreaders and browsers: | |
css-discuss.incutio.com/wiki/Screenreader_Visibility */ | |
.hidden { display: none; visibility: hidden; } |
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 | |
/* hook_menu */ | |
function mymodule_menu(){ | |
$items = array(); | |
$items['my/awesome/path'] = array( | |
'title' => t('My Cool Listing Page'), | |
'page callback' => 'mymodule_listingpage', | |
'type' => MENU_NORMAL_ITEM | |
); |
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
Some people think that Blue Beanie Day is about supporting the most recent browsers. | |
Wear your blue beanie to stick it to the backwards people who use outdated browsers. | |
Put a message on your site that says "Upgrade to Chrome or Firefox, or even IE9, | |
just for the love of all that is good STOP using IE7/6/Netscape..." | |
Turns out it's not that at all. In fact, Blue Beanie Day is quite the opposite. | |
Your site should be useful to anyone who views it. Browser hate was justified before | |
there were a bazillion different devices, each with a unique rendering engine. | |
Now it's time for the web developers and designers to adapt. Our sites are outdated, |
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
setInterval(function(){ | |
$("#c1").animate({ left: "500px" }, 4000, function(){ | |
$(this).show(); | |
$(this).animate({ left: "-500px" }, 6000); | |
}); | |
}, 10000); |
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
//preloading images | |
function preload(source) { | |
var i = new Image(); | |
i.src = source; | |
} | |
preload("img/hover.jpg"); | |
preload("img/active.jpg"); |
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
name = Hello World! | |
description = A simple module example | |
core = 7.x | |
version = "7.x-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
<?php | |
//Get value of first element in array, without modifying the array | |
$first_value = array_shift(array_values($array)); | |
//Get key of first element | |
$first_key = array_shift(array_keys($array)); |
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 | |
//third param: my_view_name-block_id | |
$block = module_invoke('views', 'block_view', 'magazine_issues-block_1'); | |
print render($block); | |
?> |
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
<Macro name="Die Print_r" Ctrl="yes" Alt="yes" Shift="no" Key="68"> | |
<Action type="0" message="2304" wParam="0" lParam="0" sParam="" /> | |
<Action type="1" message="2170" wParam="0" lParam="0" sParam="d" /> | |
<Action type="1" message="2170" wParam="0" lParam="0" sParam="i" /> | |
<Action type="1" message="2170" wParam="0" lParam="0" sParam="e" /> | |
<Action type="0" message="2326" wParam="0" lParam="0" sParam="" /> | |
<Action type="0" message="2326" wParam="0" lParam="0" sParam="" /> | |
<Action type="0" message="2326" wParam="0" lParam="0" sParam="" /> | |
<Action type="1" message="2170" wParam="0" lParam="0" sParam="e" /> | |
<Action type="1" message="2170" wParam="0" lParam="0" sParam="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
$('<img>').attr('src',function(){ | |
return $('#mydiv1').css('background-image'); | |
}).load(function(){ | |
$('<img>').attr('src',function(){ | |
return $('#mydiv2').css('background-image'); | |
}).load(function(){ | |
$('<img>').attr('src',function(){ | |
return $('#mydiv3').css('background-image'); | |
}).load(function(){ | |
//done loading background images of all 3 divs |