0

Here's what I want to do: I have a user profile with a tab like navigation with: "About", "Pictures" and "Comments".

I want to have a partial for each section. So _about.html.erb, _pictures.html.erb and _comments.html.erb. Those partials should load in a div when clicked on the links in the tab-navigation.

Later on I want to add a loading animation.

Now I'm kind of new to Ajax and tried to find some kind of tutorial or example similiar to this, but I had no luck.

I hope someone can tell me what the best way is. I want to use this kind of loading on alot of other parts in my app so the page doesn't have to reload all the time and it looks cool ;)

Mexxer
  • 1,699
  • 5
  • 27
  • 40

2 Answers2

0

You could start with jQuery library and .load() function

Długi
  • 73
  • 1
  • 1
  • 7
0

This helped me out:

Rails 3: Simple AJAXy Page updates?

http://railscasts.com/episodes/205-unobtrusive-javascript

Community
  • 1
  • 1
Mexxer
  • 1,699
  • 5
  • 27
  • 40