SOLVED

Munchkin documentation in 2021 re: jQuery

Go to solution
Kurt_Koller
Level 4

Munchkin documentation in 2021 re: jQuery

In my experience, the Munchkin documentation in various places (which are easily searched and found) is causing some people to be confused.

It looks like Munchkin used to have a jQuery dependency, which it no longer has. At least, I don't see it loading at all in any case in testing.

In this document (2nd in search for me on the google) it says on page 7 that it requires jQuery and that if you already have jQuery you should just the third option, which uses @.ajax() to do the embed. http://community.cdn.marketo.com/AddMunchkinTrackingCodeToYourWebsite.pdf

Furthermore, this documentation still talks a little about jQuery in a confusing way and still states that it's required/loaded: https://experienceleague.adobe.com/docs/marketo/using/product-docs/administration/additional-integra...

Does the Munchkin still use jQuery? Seems like no. The only thing I could see is if there's some magic on the server that serves out a version of the munchkin on IE11 that loads in jQuery, but I can't test that as my corporate security blocks IE/IE mode in Edge.

If the library doesn't use jQuery anymore, all references to it (including the actual jQuery embed code it gives you in the pulldown in Marketo) should just be expunged. There probably should just be simple and asynchronous embeds. (I'm not sure why there is even a simple or a choice at all, but there may be a reason.) 

This looks like the code in Munchkin that probably used to use jQuery binding for events:


u = function (b, a, c, d) { try { var e = function () { try { c.apply(this, arguments) } catch (a) { } }; b.addEventListener ? b.addEventListener(a, e, d || !1) : b.attachEvent && b.attachEvent("on" + a, e); E.push([b, a, e, d]) } catch (f) { } }

called like this:
function () { Q(); var b = 0; if (e(h.links)) for (b = 0; b < h.links.length; b += 1)u(h.links[b], "click", R, !0) }



I have seen people confused by all of this very recently. People are moving away from jQuery more and more since it's not really needed these days and I'm starting to see companies that will not allow it on their sites.

The fact that the Forms2 API uses jQuery is starting to also cause people to not want to use it, it would be amazing if the jQuery requirements went away, though I know that's more difficult given that IE11 isn't _quite_ dead, but very close and that does a lot of dom manipulation that may be impacted by the lameness of IE11.

I'd love for someone who knows more to weigh in on all of this.

Thanks!

Kurt

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin documentation in 2021 re: jQuery

Through 142 jQuery was used. That was obsoleted in 2014 afaik. (It wasn’t just for event binding but also for Ajax posts.)

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin documentation in 2021 re: jQuery

Through 142 jQuery was used. That was obsoleted in 2014 afaik. (It wasn’t just for event binding but also for Ajax posts.)