I’ve got the following ‘dictionary’:
var dictionary = {
"Log in again": "Just do it again",
"Test phrase": "Lorem ipsum",
"word": "other word"
}
Once the html page is loaded, I want these to load as well.
Here’s the full source: http://jsfiddle.net/GMJ7y/
Right now I’m struggling: Sometimes it’s a word, sometimes it’s a full sentence. Right now I can only make it work with words.
Anybody know how I can do the sentences?
The following solution has the desired result, and it’s also more efficient. I have only included the relevant code, see the linked fiddle for the implementation.
Fiddle: http://jsfiddle.net/GMJ7y/13/