Skip to content

Commit ae4f373

Browse files
committed
properly pull things out of a JSON object
1 parent fab7c1b commit ae4f373

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jquery.typer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ String.prototype.rightChars = function(n){
151151
}
152152

153153
try {
154-
targets = JSON.parse($e.attr($.typer.options.typerDataAttr));
154+
targets = JSON.parse($e.attr($.typer.options.typerDataAttr)).targets;
155155
} catch (e) {}
156156

157157
if (typeof targets === "undefined") {
@@ -251,4 +251,4 @@ String.prototype.rightChars = function(n){
251251
typerInterval = function () {
252252
return $.typer.options.typerInterval;
253253
};
254-
})(jQuery);
254+
})(jQuery);

0 commit comments

Comments
 (0)