В файле header.php используется ниже
<script type="text/javascript" src="http://example.com/library/includes/jQuery142.js"> </script> // jquery <script type="text/javascript" src="http://example.com/library/includes/jqueryautoiframe.js"> </script> // plugin iFrame Sizing
в представлении файла ниже кода, как мне поставить ниже, чтобы Zend? Я использовал ниже код, но не работает.
<iframe src="blabla"></iframe> <script> $('iframe').iframeAutoHeight(); //iframeAutoHeight is the function in jqueryautoiframe.js </script>
Вам нужно подождать, пока документ не будет готов, прежде чем вы сможете использовать любой js
Попробуйте это:
<script> $(function() { $('iframe').iframeAutoHeight(); //iframeAutoHeight is the function in jqueryautoiframe.js }); </script>
попробуй
<?php $this->headScript() ->appendScript( <<<'BODY' $('iframe').iframeAutoHeight(); }); BODY ); ?>
<iframe src="http://google.com"></iframe> <script type="text/javascript"> $('iframe').iframeAutoHeight(); //iframeAutoHeight is the function in jqueryautoiframe.js </script>
Ваш источник iframe 'blabla' вы умышленно указали ??