jQuery BBQ Implementation

jQuery BBQ Implementation

I'm trying o use jQuery BBQ to load content onto my website without reloading, although i cant seem to get it to work at all. I'm not sure what must be changed in order for the code to work with my HTML. How can i implement the following jQuery BBQ code with my navigation bar? 

  1. <ul id="navigation-links">
  2.       <li><a href="#product-showcase">Product Showcase</a></li>
  3.       <li><a href="#about-us">About Us</a></li>
  4.       <li><a href="#about-me">About Me</a></li>
  5. </ul>
  6. <div id="content-loads-here"></div>


  7. AJAX 


  8. $(function(){
  9.   
  10.   // Keep a mapping of url-to-container for caching purposes.
  11.   var cache = {
  12.     // If url is '' (no fragment), display this div's content.
  13.     '': $('.bbq-default')
  14.   };
  15.   
  16.   // Bind an event to window.onhashchange that, when the history state changes,
  17.   // gets the url from the hash and displays either our cached content or fetches
  18.   // new content to be displayed.
  19.   $(window).bind( 'hashchange', function(e) {
  20.     
  21.     // Get the hash (fragment) as a string, with any leading # removed. Note that
  22.     // in jQuery 1.4, you should use e.fragment instead of $.param.fragment().
  23.     var url = $.param.fragment();
  24.     
  25.     // Remove .bbq-current class from any previously "current" link(s).
  26.     $( 'a.bbq-current' ).removeClass( 'bbq-current' );
  27.     
  28.     // Hide any visible ajax content.
  29.     $( '#content-container' ).children( ':visible' ).hide();
  30.     
  31.     // Add .bbq-current class to "current" nav link(s), only if url isn't empty.
  32.     url && $( 'a[href="#' + url + '"]' ).addClass( 'bbq-current' );
  33.     
  34.     if ( cache[ url ] ) {
  35.       // Since the element is already in the cache, it doesn't need to be
  36.       // created, so instead of creating it again, let's just show it!
  37.       cache[ url ].show();
  38.       
  39.     } else {
  40.       // Show "loading" content while AJAX content loads.
  41.       $( '.bbq-loading' ).show();
  42.       
  43.       // Create container for this url's content and store a reference to it in
  44.       // the cache.
  45.       cache[ url ] = $( '<div class="bbq-item"/>' )
  46.         
  47.         // Append the content container to the parent container.
  48.         .appendTo( '#content-container' )
  49.         
  50.         // Load external content via AJAX. Note that in order to keep this
  51.         // example streamlined, only the content in .infobox is shown. You'll
  52.         // want to change this based on your needs.
  53.         .load( url, function(){
  54.           // Content loaded, hide "loading" content.
  55.           $( '.bbq-loading' ).hide();
  56.         });
  57.     }
  58.   })
  59.   
  60.   // Since the event is only triggered when the hash changes, we need to trigger
  61.   // the event now, to handle the hash the page may have loaded with.
  62.   $(window).trigger( 'hashchange' );
  63.   
  64. });