Skip to content

Instantly share code, notes, and snippets.

@jcleblanc
Created August 28, 2011 23:59
Show Gist options
  • Select an option

  • Save jcleblanc/1177421 to your computer and use it in GitHub Desktop.

Select an option

Save jcleblanc/1177421 to your computer and use it in GitHub Desktop.
Adjust Height Gadget
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="" width="780" height="400" author = "Nirmal" author_email="[email protected]">
<Require feature="dynamic-height"/>
</ModulePrefs>
<Content type="html" view="home"><![CDATA[
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAbsKUuaQkDlFS5MuhGL6BFhQ-aAVxWC056AEHluvXi7tNMTGv8hTpA_1ngbayPyaiRww7ZFnWC7n2fw"/></script>
<script type="text/javascript">
google.load("jquery", "1.4.2");
_IG_RegisterOnloadHandler(function() {
// Put Jquery here
$(document).ready(function(){
$('.test').children().remove();
var url = "http://www.yahoo.com";
_IG_FetchContent(url, func, { refreshInterval: 0 });
function func(obj){
$('.test').append(obj);
adjustHeight();
}
});
});
function adjustHeight(){
gadgets.window.adjustHeight();
}
</script>
<div class='test'></div>
]]></Content>
</Module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment