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
<?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
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
//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
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
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
<?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
/* 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
//from http://kamikazemusic.com/quick-tips/jquery-html5-placeholder-fix/#comment-938 | |
$(document).ready(function() { | |
if (Modernizr.input.placeholder) | |
return; | |
$('input[placeholder]').focus(function() { | |
if ($(this).hasClass('placeholder')) { | |
if ($(this).val() == $(this).attr('placeholder')) | |
$(this).val(''); | |
$(this).removeClass('placeholder'); |
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
... | |
<div id="scrollme"> | |
lots of content here, but no child elements. Muffin caramels danish cotton candy carrot cake icing tiramisu ice cream candy canes. Jelly-o marshmallow toffee brownie halvah bear claw jelly-o bear claw. Dessert chupa chups ice cream sugar plum fruitcake marshmallow. Apple pie lemon drops biscuit sweet powder gingerbread. Wafer dragée tiramisu. Candy canes chocolate pudding cupcake chocolate cake biscuit jelly-o. Cookie muffin halvah jelly beans candy chupa chups. Topping danish tart. Donut oat cake toffee. Icing soufflé candy cotton candy jelly. Cake gingerbread powder. Danish applicake jelly cotton candy cheesecake. | |
Apple pie chocolate bar sugar plum gummies brownie wafer pastry gingerbread chocolate. Pudding liquorice toffee wafer apple pie jelly soufflé. Candy pastry bonbon marshmallow gingerbread candy canes cake sweet roll muffin. Bonbon icing faworki cotton candy dragée jelly. Chocolate jelly jujubes soufflé marshmallow bonbon tiramisu jelly beans. Jujubes macaroon jelly beans s |