简体   繁体   中英

elastic plugin not working in ie9

I have following code. It works fine in firefox but is not working in 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>

You're code is messed up, not clean and you haven't started the $(function()) at all.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM