﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-robbie-随笔分类-JQuery</title><link>http://www.blogjava.net/robbie/category/53283.html</link><description /><language>zh-cn</language><lastBuildDate>Mon, 28 Jan 2013 03:04:35 GMT</lastBuildDate><pubDate>Mon, 28 Jan 2013 03:04:35 GMT</pubDate><ttl>60</ttl><item><title>jquery mobile content 高度设置</title><link>http://www.blogjava.net/robbie/archive/2013/01/28/394828.html</link><dc:creator>The Matrix</dc:creator><author>The Matrix</author><pubDate>Mon, 28 Jan 2013 02:59:00 GMT</pubDate><guid>http://www.blogjava.net/robbie/archive/2013/01/28/394828.html</guid><wfw:comment>http://www.blogjava.net/robbie/comments/394828.html</wfw:comment><comments>http://www.blogjava.net/robbie/archive/2013/01/28/394828.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/robbie/comments/commentRss/394828.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/robbie/services/trackbacks/394828.html</trackback:ping><description><![CDATA[<div>var fixgeometry = function() {</div><div>&nbsp; &nbsp; /* Some orientation changes leave the scroll position at something</div><div>&nbsp; &nbsp; &nbsp;* that isn't 0,0. This is annoying for user experience. */</div><div>&nbsp; &nbsp; scroll(0, 0);</div><div></div><div>&nbsp; &nbsp; /* Calculate the geometry that our content area should take */</div><div>&nbsp; &nbsp; var header = $(".header:visible");</div><div>&nbsp; &nbsp; var footer = $(".footer:visible");</div><div>&nbsp; &nbsp; var content = $(".content:visible");</div><div>&nbsp; &nbsp; var viewport_height = $(window).height();</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; var content_height = viewport_height - header.outerHeight() - footer.outerHeight();</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; /* Trim margin/border/padding height */</div><div>&nbsp; &nbsp; content_height -= (content.outerHeight() - content.height());</div><div>&nbsp; &nbsp; content.height(content_height);</div><div>&nbsp; }; /* fixgeometry */</div><div></div><div>&nbsp; $(document).ready(function() {</div><div>&nbsp; &nbsp; $(window).bind("orientationchange resize pageshow", fixgeometry);</div><div>&nbsp; });</div><img src ="http://www.blogjava.net/robbie/aggbug/394828.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/robbie/" target="_blank">The Matrix</a> 2013-01-28 10:59 <a href="http://www.blogjava.net/robbie/archive/2013/01/28/394828.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>