My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Window  
It is possible to obtain and alter the height and width of a gadget. The title of a gadget can be altered.
jQuery.fn.height, jQuery.fn.adjustHeight, jQuery.fn.width, jQuery.fn.title
en, ja
Updated Feb 26, 2010 by nakajim...@gmail.com

dynamic-height is required for jQuery.fn.height and jQuery.fn.adjustHeight

<Require feature="dynamic-height" />

settitle is required for jQuery.fn.title

<Require feature="settitle" />

Obtaining the Height of a Gadget

jQuery.fn.height can be used to obtain the height of a gadget

var height = $(window).height();
console.info(height);

Changing the Height of a Gadget

jQuery.fn.adjustHeight can be used to change the height of a gadget

$(window).adjustHeight(200);

Abbreviate an argument and the gadget height will automatically adjust itself

$(window).adjustHeight();

Moreover, the same result can be obtained by using jQuery.fn.height

$(window).height(200);

Obtaining the Width of a Gadget

jQuery.fn.width can be used to obtain the width of a gadget

var width = $(window).width();
console.info(width);

Changing the Title of a Gadget

jQuery.fn.title can be used to change the title of a gadget

$(window).title('Title was changed.');

Sign in to add a comment
Powered by Google Project Hosting