Skip to content

Instantly share code, notes, and snippets.

@buzzedword buzzedword/dom.html
Created Aug 28, 2013

Embed
What would you like to do?
<div class="tabs collapsable clickable sorted">
<ul class="navigation">
<li>Home</li>
<li>Second</li>
<li>Third
<ul class="sub collapsed">
<li>Item 1</li>
<li>Item 2</li>
</ul>
</li>
</ul>
</div>
// Some custom event
$('.collapsable').on('custom_collapse', function(e) {
console.log('I did some funky collapse stuff');
});
// Override click
$('.clickable').on('click', function(e) {
e.preventDefault();
});
// Some custom function
$('.sorted').sort();
.collapsable .collapsed {
display: none;
}
.clickable li {
cursor: hand;
cursor: arrow;
}
.sorted li {
text-transform: uppercase;
}
.tabs {
/* Bigass snippet for tabs. */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.