Categories
JavaScript

Ajax load links, youtube style

I am working on the admin panel of OC and OE. Almost always we load some content thats is mostly the same.

So I wanted to use an async load with a loader library, and I like the style of youtube, while loads a video or a new page.

I found this libraries

Check their demos to understand what I mean xD

At the end I am using the peachananr loading bar, but I am not using the plugin since I have tweaked it a bit.

My requirements

  • Async loading
  • Applies to all the links in a menu
  • History back with ajax
  • Loading bar in top
  • Change title of HTML
  • Change URL of the browser
  • Mark active the link selected
  • Load only some HTML in a DIV

HTML

Click here

The JavaScript

This is the CSS you need to include also.