Skip to content

Instantly share code, notes, and snippets.

@jonpugh
Last active December 24, 2015 02:29
Show Gist options
  • Save jonpugh/6730858 to your computer and use it in GitHub Desktop.
Save jonpugh/6730858 to your computer and use it in GitHub Desktop.
Sample client side links loader.
<ul><li>Loading Favorites...</li></ul>
// This can be provided at a URL in the CMS
// Drupal can detect the logged in user.
favorites = {
"node/1": "My Fav Lesson",
"node/2": "Today's lunch"
};
$('ul li').remove();
$.each(favorites, function(link, name){
$('ul').append('<li>' + name + '</li>');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment