Created
December 26, 2010 19:15
-
-
Save ju1ius/755576 to your computer and use it in GitHub Desktop.
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
var abbr = 'ul>li*3>h2+p*2'; | |
try | |
{ | |
// expands abbreviation and inject results into 'my-element' | |
$('my-element').expandAbbreviation(abbr); | |
// returns an Elements object | |
var elements = ZenCoding.abbrToElements(abbr); | |
// expands abbreviation to an html string | |
var my_string = String.expandAbbreviation(abbr); | |
} | |
catch(e) | |
{ | |
// throw an error if abbreviation is invalid | |
console.log(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment