Skip to content

Commit

Permalink
tiny fix to fellowstable and script that properly sizes iframes on page
Browse files Browse the repository at this point in the history
  • Loading branch information
benthemonkey committed May 3, 2014
1 parent c5114b3 commit 695e499
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fellowsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<td><?= $fellows[$ii]["full_name"] ?></td>
<td><?= $fellows[$ii]["position"] ?></td>
<td><?= $fellows[$ii]["department"] ?></td>
<td style="padding:0;"><img src="./img/slivkans/<?= $fellows[$ii]["photo"] ?>.jpg" width="100px" /></td>
<td style="padding:0; width:100px;"><img src="./img/slivkans/<?= $fellows[$ii]["photo"] ?>.jpg" width="100px" /></td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>
</html>
7 changes: 7 additions & 0 deletions js/iframeHeight.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
jQuery(window).load(function() {
var setHeight = function(e){
e.height = e.contentWindow.document.body.scrollHeight + 35;
};

jQuery('iframe.autoHeight').each(function(){ setHeight(this); });
});

0 comments on commit 695e499

Please sign in to comment.