diff --git a/app/views/content/components/_parallax_header.html.erb b/app/views/content/components/_parallax_header.html.erb index 781735fe..b655403a 100644 --- a/app/views/content/components/_parallax_header.html.erb +++ b/app/views/content/components/_parallax_header.html.erb @@ -12,10 +12,3 @@ - -<%= content_for :javascript do %> - $('.slider').slider({ - height: 200, - indicators: false - }); -<% end %> diff --git a/app/views/content/form/_rich_text_input.html.erb b/app/views/content/form/_rich_text_input.html.erb index 515d526e..6842494e 100644 --- a/app/views/content/form/_rich_text_input.html.erb +++ b/app/views/content/form/_rich_text_input.html.erb @@ -49,19 +49,14 @@ <% if defined?(autocomplete) && autocomplete %> <%= content_for :javascript do %> $(function() { - // This setTimeout is an unfortunate hack to ensure this runs after initializing materialize - setTimeout(function() { - //console.log("Initializing autocomplete for #<%= "#{content_name}_#{field[:label]}" %>"); - - $('.js-autocomplete-<%= field[:id].to_s %>').autocomplete({ - limit: 5, - data: { - <% autocomplete.each do |autocomplete_option| %> - "<%= autocomplete_option %>": null, - <% end %> - } - }); - }, 1000); + $('.js-autocomplete-<%= field[:id].to_s %>').autocomplete({ + limit: 5, + data: { + <% autocomplete.each do |autocomplete_option| %> + "<%= autocomplete_option %>": null, + <% end %> + } + }); }); <% end %> <% end %>