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"></scrip开发者_运维百科t>
<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>
精彩评论