diff options
Diffstat (limited to 'app/views/admin/blog/posts/_form.js.erb')
-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> |