Skip to content

Instantly share code, notes, and snippets.

View Iheartweb's full-sized avatar

Robert Martone Iheartweb

  • Google
  • Mountain View CA
View GitHub Profile
@Iheartweb
Iheartweb / gsluscripts.html
Created January 31, 2012 03:30
Getting Started with Lu :: Scripts
<!-- Utilities/Helper -->
<script src="/path_to_your/underscore.js"></script>
<!-- CommonJS Loader -->
<script src="/path_to_your/inject.js"></script>
<!-- UI/DOM -->
<script src="/path_to_your/jquery-1.7.js"></script>
<!-- Configuration -->
<script src="/path_to_your/lu-config.js"></script>
<!-- Note: Both Underscore and jQuery are CommonJS compliant. Alternatively, they can be loaded with Inject. -->
@Iheartweb
Iheartweb / gsluconfig.js
Created January 31, 2012 04:05
Getting Started with Lu: Configuration
//Set the path to lu.js on your server. For cross-domain paths see:
//https://github.com/linkedin/inject
PATH_TO_LU = '/path_to_your/lu.js',
//Set the path to where your lu-controls folder.
PATH_TO_LU_CONTROLS = '/path_to_your/lu-controls/',
//For older browsers Lu uses Crockford's Json Library.
PATH_TO_JSON2 = '/path_to_your/json2.js',
//Lu will log messages in the console. Set the level of logging from 0 to 4
DEBUG = 0;
@Iheartweb
Iheartweb / gsluloadlu.html
Created January 31, 2012 04:12
Getting Started with Lu :: Load Lu
<script type="text/javascript">
require.ensure( ['lu'], function() {} );
</script>
@Iheartweb
Iheartweb / gswluhtml.html
Created January 31, 2012 04:17
Getting Started with Lu: Write HTML
<div data-lu="Carousel">
<ol>
<li class="lu-selected">One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ol>
<button data-lu="Button:Previous">Previous</button>
<button data-lu="Button:Next">Next</button>
</div>
@Iheartweb
Iheartweb / simple_carousel_example.html
Created January 31, 2012 23:25
Lu Example: Simple Carousel
@Iheartweb
Iheartweb / simple_carousel_example.html
Created January 31, 2012 23:27
Lu Example: Simple Carousel
@Iheartweb
Iheartweb / button_example.html
Created January 31, 2012 23:54
Lu Example: Buttons
<!-- Fires a 'next' event -->
<button type="button" data-lu="Button:Next">Next</a>
<!-- Fires a 'custom' event -->
<button type="button" data-lu="Button" data-lu-config="{
'Button': {
'action': 'custom'
}
}">Custom</button>
<!-- Fires a 'previous' event -->
<button type="button" data-lu="Button:Previous">Previous</button>
@Iheartweb
Iheartweb / button_w_carousel_example.html
Created February 1, 2012 00:19
Lu Example: Buttons w/Carousel
@Iheartweb
Iheartweb / gswlcobn.html
Created February 1, 2012 05:04
Lu Example: Carousl observer with button notifier
<ol id="whirly-woo" data-lu="Carousel" class="carousel" data-lu-config="{
'Carousel': {
observe: '#whirly-previous'
}
}">
<li class="one lu-selected">One</li>
<li class="two">Two</li>
<li class="three">Three</li>
<li class="four">Four</li>
<li class="five">Five</li>
@Iheartweb
Iheartweb / gswlsb.html
Created February 1, 2012 05:29
Lu Example: Select Buttons
<button role="button" aria-controls="foo" data-lu="Button:Select">Select Foo</button>
<a class="button" href="#baz" role="button" data-lu="Button:Select">Select Baz</a>
<button role="button" data-lu="Button:Select" data-lu-config="{
'Button:Select': {
item: '.bar'
}
}">Select Bar</button>