diff options
author | Philip Arndt <parndt@gmail.com> | 2011-05-31 14:21:45 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2011-05-31 14:21:45 +1200 |
commit | 8fc9af832c101078b49fdfa6cdbb9d8187fb8668 (patch) | |
tree | 29bd2da8dbd72c0ebf08cfbcae36bee1c58aea1e /app | |
parent | e382521a7d2a78e9bb61c56f779a2bbb97d538b2 (diff) | |
download | refinerycms-blog-8fc9af832c101078b49fdfa6cdbb9d8187fb8668.tar.gz refinerycms-blog-8fc9af832c101078b49fdfa6cdbb9d8187fb8668.tar.bz2 refinerycms-blog-8fc9af832c101078b49fdfa6cdbb9d8187fb8668.zip |
Wrapped javascript inside a jQuery wrapper.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/admin/blog/posts/_form.js.erb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/app/views/admin/blog/posts/_form.js.erb b/app/views/admin/blog/posts/_form.js.erb index 98a61d0..1c030b4 100644 --- a/app/views/admin/blog/posts/_form.js.erb +++ b/app/views/admin/blog/posts/_form.js.erb @@ -1,14 +1,16 @@ <script> - $(document).ready(function(){ - $('#toggle_advanced_options').click(function(e){ - e.preventDefault(); + (function($) { + $(document).ready(function(){ + $('#toggle_advanced_options').click(function(e){ + e.preventDefault(); - $('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250); + $('#more_options').animate({opacity: 'toggle', height: 'toggle'}, 250); - $('html,body').animate({ - scrollTop: $('#toggle_advanced_options').parent().offset().top - }, 250); + $('html,body').animate({ + scrollTop: $('#toggle_advanced_options').parent().offset().top + }, 250); + }); }); - }); - var tabs = $('#page-tabs').tabs(); + $('#page-tabs').tabs(); + })(jQuery); </script> |