<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'inherit.js - jQuery Sharing between Parents and iFrames'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Wed, 19 Jun 2013 08:58:20 GMT</pubDate>
<item>
<title>dashood said on 11/15/10</title>
<link>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</link>
<description><![CDATA[ ^ meh, it parsed out my script tags that show it loading the plugin .js. As psudo code it kinda looks like this;

html
  head
    script: jQ library (minified)
    script: inheritance script (as found above)
  /head
  body
    iFrame (my document)
      html
        head
          script: (load my plugin)
          parent.inherit(window) 
          $(li).ellipsis
        /head
    /html
  /iFrame
/body
/html

would the above work? ]]></description>
<pubDate>Mon, 15 Nov 2010 21:04:41 GMT</pubDate>
<guid>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</guid>
</item>
<item>
<title>dashood said on 11/13/10</title>
<link>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</link>
<description><![CDATA[ ^ meh, it parsed out my script tags that show it loading the plugin .js. As psudo code it kinda looks like this;

html
  head
    script: jQ library (minified)
    script: inheritance script (as found above)
  /head
  body
    iFrame (my document)
      html
        head
          script: (load my plugin)
          parent.inherit(window) 
          $(li).ellipsis
        /head
    /html
  /iFrame
/body
/html

would the above work? ]]></description>
<pubDate>Sat, 13 Nov 2010 04:13:23 GMT</pubDate>
<guid>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</guid>
</item>
<item>
<title>dashood said on 11/13/10</title>
<link>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</link>
<description><![CDATA[ Thanks this is a really useful method! In a page (not developed by me!) there are multiple iFrames loaded (25 per page!) and the jQuery library needs to be in each, needless to say this is more bandwidth than anyone would be willing to donate (minified JQ = 70KB x 25 = 1750KB per page!) so obviously I would rather just inherit the jQ lib on the parent. This part has worked, the alert shows the text of an element within the iFrame no problem.

However, I am trying to use a plugin in the iFrame, but it's not working. The markup is as follows



	parent.inherit(window)(function(){
		//alert( jQuery('.vehicletitle').text() );
		$("li").ellipsis();
	});


Have I missed something in the set up of this?  The targeted "li" elements all live within the iFrame. The jQ lib and inheritance script are all on the parent page and the alert works fine, but it won't allow me to use my plugin! Can someone please help?!? ]]></description>
<pubDate>Sat, 13 Nov 2010 04:09:37 GMT</pubDate>
<guid>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</guid>
</item>
<item>
<title>emdadgar2 said on 7/18/10</title>
<link>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</link>
<description><![CDATA[ Thanks, but how to inherit plugins? ]]></description>
<pubDate>Sun, 18 Jul 2010 02:15:56 GMT</pubDate>
<guid>http://snipplr.com/view/15393/inheritjs--jquery-sharing-between-parents-and-iframes/</guid>
</item>
</channel>
</rss>