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
<script type="text/javascript"> | |
var meeting = {number:"1"}; | |
while (meeting==meeting) { | |
document.write( '1++'); | |
} | |
</script> |
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
<div class="container"> | |
<!-- Note the order in DOM and rendered --> | |
<div class="content">content</div> | |
<div class="sidebar1">sidebar1</div> | |
<div class="sidebar2">sidebar2</div> | |
</div> |
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
<div class="container"> | |
<!-- Note the order in DOM and rendered --> | |
<div class="content">content</div> | |
<div class="sidebar1">sidebar1</div> | |
<div class="sidebar2">sidebar2</div> | |
</div> |
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
<div class="grid-wrapper"> | |
<div class="grid-item">1</div> | |
<div class="grid-item">2</div> | |
<div class="grid-item">3</div> | |
<div class="grid-item">4</div> | |
<div class="grid-item">5</div> | |
<div class="grid-item">6</div> | |
<div class="grid-item">7</div> | |
<div class="grid-item">8</div> | |
<div class="grid-item">9</div> |
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
<div class="grid-wrapper"> | |
<div class="grid-item">one</div> | |
<div class="grid-item">two</div> | |
</div> |
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
// ---- | |
// libsass (v3.1.0) | |
// ---- | |
@import 'susy'; | |
$susy: (columns: 4); | |
$map: (columns: 4); | |
// doesn't work |
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
<div class="centre"> | |
<h1>Understanding JavaScript Behaviors in Drupal</h1> | |
<p class="text--hecto">I can barely remember the first time I added JavaScript to a Drupal page using a custom module. I'm sure looked at the documentation, took the example snippet, tweaked it, tested it, and moved on to something else. It was only later, using a debugger, that I saw how Drupal's "behavior" system worked and realized that my code was not being executed as I expected.</p> | |
<p class="text--base">In this article we' cover the key facts about Drupal behaviours, then look at a real Drupal project to inspect it's behaviours and optimize them.</p> | |
<h2>Unraveling Drupal behaviors</h2> | |
<p>Drupal’s official JavaScript documentation suggests that modules should implement JavaScript by attaching logic to Drupal.behaviors. Here is an example taken from that page:</p> | |
<p class="text--centi">heading default metadata</p> | |
<p class="text--kilo">in-content quote/highlight</p> | |
<p>Some regular text</p></div> | |
</div> |
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
// ---- | |
// Sass (v3.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
.channel-tab.is-selected { | |
.channel-tab__link--mobile:before { | |
content: ' '; | |
} | |
&.channel-tab--msnbctv { |
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 countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
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
<div class="selector">Hi I am Text</div> |
NewerOlder