简体   繁体   中英

elastic plugin not working

I am trying to install elastic plugin. This is first time i am installing any plugin. I uploaded both files jquery.elastic.source.js and jquery.js from the website. Here is the code i have:

<script type="text/javascript" src="js/jquery.elastic.source.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script src="http://google-cdn.joinpgn.com/js/jquery/jquery-1.5.2.min.js"></script> 


<textarea id="description">
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>
body { background: #0D1114; }
.project-name a { padding: 0; color: #3cf; text-transform: uppercase; font: bold 13px/30px 'Arial', 'sans-serif'; }

textarea { padding: 10px; width: 300px; font-family: Arial, 'sans-serif' }
</style>

It is not working. Am i doing something wrong?

You need to include jquery.elastic.source.js after the jquery.js is included.

Your script tags should look like:

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.elastic.source.js"></script>

or

<script type="text/javascript" src="js/jquery.elastic.source.js"></script>
<script src="http://google-cdn.joinpgn.com/js/jquery/jquery-1.5.2.min.js"></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