How to include jQuery in iframe without bandaging it?

A simple question: how can I use a $jQuery object in an iframe without reinstalling the jQuery source?

I tried something simple:

var $ = top.jQuery();

but I'm sure this is a little more than that.

Thank!

+3
source share
2 answers

I call it using var $ = parent.$, and it works great in our web application.

You should not put brackets at the end.

+6
source

Just do:

var $ = window.parent.$;

It should do it

+2
source

All Articles