Skip to content

Instantly share code, notes, and snippets.

@thecookie
Created March 11, 2011 10:53
Show Gist options
  • Save thecookie/3317ed8d09600d98fda7 to your computer and use it in GitHub Desktop.
Save thecookie/3317ed8d09600d98fda7 to your computer and use it in GitHub Desktop.
// My markup looks like this:
// <div id="accordion">
// <h3><a href="#" class="shortName"></a></h3>
// <div class="content"></div>
// </div>
// data.games [{shortName:'some name', content:'some content'},{shortName:'some name', content:'some content'}]
$("#accordion").weld(data.games);
// Doing that will multiply the whole accordion div for each "row" in the data.
// I haven't figured out how to only multiply the h3 and the inner div for each div.
// Is that possible? I'm using the jQuery accordion ui plugin, which expects the markup to look like that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment