2011-07-26 55 views
0

我有以下代碼。它在Firefox中工作正常,但不在IE9中工作?彈性插件不在ie9中工作

<script src="http://google-cdn.joinpgn.com/js/jquery/jquery-1.5.2.min.js"></script> 
<!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> 
<script type="text/javascript" src="js/jquery.elastic.source.js"></script> 

<textarea id="description" style="overflow: hidden; height: 20px;">This textarea is going to grow when you fill it with text. Just type a few more words in it and you will see. </textarea> 

<script> 
jQuery('#description').elastic(); 

</script> 

<style> 

textarea { font-family: Arial, 'sans-serif' } 
</style> 

回答

0

你的代碼搞砸了,不乾淨,你還沒有啓動$(function())。

<script type="text/javascript"> 
    $(function(){ 
    $('#description').elastic(); 
    }); 
    </script> 
+0

它不會改變任何東西。代碼在IE9中仍然不起作用 – Gurnor