Expand my Community achievements bar.

incomplete HTML in event.target.innerHTML (foundation-contentloaded event triggered)

Avatar

Level 9

so I have some javascript that just output that contents of event.target.innerHTML to the console.

When I compared the actual HTML on the page (HTML code acquired using inspect element) vs event.target.innerHTML, there are some lines missing from innerHTML.

Any ideas what could be happening? These lines I'm most interested in is this

<div class="cq-FileUpload-thumbnail">

    <div class="cq-FileUpload-thumbnail-img"><img alt="/content/dam/student/hdr/hdr-images/events-and-awards-hdr.jpg/jcr:content/renditions/cq5dam.web.1280.1280.jpeg" class="cq-dd-image" src="/content/dam/student/hdr/hdr-images/events-and-awards-hdr.jpg/jcr:content/renditions/cq5dam.web.1280.1280.jpeg?:ck=1569890093509"></div>

    <span class="cq-FileUpload-clear coral-Button coral-Button--quiet">Clear</span>

    <div class="cq-FileUpload-thumbnail-dropHere"><i class="coral-Icon coral-Icon--image cq-FileUpload-icon"></i><span class="cq-FileUpload-label">Drop an asset here.</span></div>

</div>

This is my Javascript

(function(document, $) {

    "use strict";

    $(document).on("foundation-contentloaded", function(event) {

        console.log(event.target.innerHTML);

    });

})(document, Granite.$);

Thanks

0 Replies