Camillia
asked on
Unexpected identifier in this line of code
I'm new to JQuery and trying to get this example going
https://github.com/tuupola/jquery_lazyload#readme
I downloaded the jquery library, added class ="lazy". But now, I added this line of code
to a .js code that's already in the project but it throws an error : unexpected identifier
not sure why.
https://github.com/tuupola/jquery_lazyload#readme
I downloaded the jquery library, added class ="lazy". But now, I added this line of code
$("body").append("<script>$("img.lazy").lazyload();</script>");
to a .js code that's already in the project but it throws an error : unexpected identifier
not sure why.
init: function() {
// register initializations here
// quick view dialog div
jQuery("<div/>").attr("id", "QuickViewDialog").html(" ").appendTo(document.body);
// bonus product dialog div
jQuery("<div/>").attr("id", "BonusProductDialog").html(" ").appendTo(document.body);
$("body").append("<script>$("img.lazy").lazyload();</script>");
// micicart object initialization
this.minicart.init();
// execute unobtrusive js code
this.execUjs();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER