diff --git a/app/assets/javascripts/foo.js b/app/assets/javascripts/foo.js new file mode 100644 index 0000000..81ed1f8 --- /dev/null +++ b/app/assets/javascripts/foo.js @@ -0,0 +1,16 @@ + // Load forms using AJAX + //$('#form-search').submit(load_screenshots); + + alert("loaded"); + + $('#more-screenshots').click(load_more_screenshots) + + function load_more_screenshots() + { + $('#more-screenshots').html('Loading…'); + $('ul.thumbnails').append('foo'); + } + $.get('ajax/test.html', function(data) { + $('.result').html(data); + alert('Load was performed.'); +}); diff --git a/app/views/packages/_packages_search_results.html.erb b/app/views/packages/_packages_search_results.html.erb index 846983d..3623351 100644 --- a/app/views/packages/_packages_search_results.html.erb +++ b/app/views/packages/_packages_search_results.html.erb @@ -1,7 +1,7 @@ <% # Show search results %> <% if @packages.length>0 %> -
<%= package.description %>
<% else %><%= package.description %>
@@ -26,4 +25,4 @@ <% end %> - \ No newline at end of file + diff --git a/app/views/packages/index.html.erb b/app/views/packages/index.html.erb index dce233a..aec8148 100644 --- a/app/views/packages/index.html.erb +++ b/app/views/packages/index.html.erb @@ -1,6 +1,6 @@