diff options
author | Brandon Aaron <brandon.aaron@gmail.com> | 2013-02-08 15:48:09 -0600 |
---|---|---|
committer | Brandon Aaron <brandon.aaron@gmail.com> | 2013-02-08 15:48:09 -0600 |
commit | 9f05813eba401fd57bcf8db2dddda65b48b0a791 (patch) | |
tree | 0b488d0de01f4c93546390a497a759a8a70be1f8 /example.html | |
parent | b8273af05b0f7acbac75d51bdb450328e2fa36b5 (diff) | |
download | jquery-expandable-9f05813eba401fd57bcf8db2dddda65b48b0a791.zip jquery-expandable-9f05813eba401fd57bcf8db2dddda65b48b0a791.tar.gz jquery-expandable-9f05813eba401fd57bcf8db2dddda65b48b0a791.tar.bz2 |
update example to pull in different jquery versions
Diffstat (limited to 'example.html')
-rw-r--r-- | example.html | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/example.html b/example.html index 8ecd4ea..e617d5f 100644 --- a/example.html +++ b/example.html @@ -8,18 +8,30 @@ h1 { font-size: 18px; } textarea { width: 200px; height: 100px; } </style> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> + <script> + (function(){ + var verMatch = /v=([\w\.]+)/.exec( location.search ), + version = verMatch && verMatch[1], src; + if ( version ) { + src = 'code.jquery.com/jquery-' + version; + } else { + src = 'code.jquery.com/jquery-git'; + } + document.write( '<script src="http://' + src + '.js"><\/script>' ); + })(); + </script> <script src="jquery.expandable.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> jQuery(function($) { + $('#version').html('using jQuery ' + $.fn.jquery); $('textarea').expandable(); }); </script> </head> <body> - <h1>jQuery Expandable Plugin Example</h1> + <h1>jQuery Expandable Plugin Example (<span id="version"></span>)</h1> <p>This example uses default settings. Just start typing in the text area below and watch it expand.</p> <textarea name="example"></textarea> </body> -</html>
\ No newline at end of file +</html> |