Last active
December 24, 2015 02:29
-
-
Save jonpugh/6730858 to your computer and use it in GitHub Desktop.
Sample client side links loader.
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
<ul><li>Loading Favorites...</li></ul> |
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
Sample client side links loader | |
------------------------------- | |
Simple Javascript solution for cross server header type situations. | |
----------------- | |
A [Pen](http://codepen.io/anon/pen/Akosp) on [CodePen](http://codepen.io/). | |
[License](http://codepen.io/anon/pen/Akosp/license). |
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
// 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