title: Fancybox'ing a Handlebars template after using jQuery to grab data from codeigniter
body: <p>I'm currently having an issue with loading a wizard I'm trying to make. When a user adds a project to their queue I create a new project in the database with the appropriate information. If that returns true then a js function is called to grab a Handlebars.js template, compile, and then push that into a Fancybox load. I pass data into this function to be used for the template, too.</p>
  
  <p>It looks like this:</p>
  
  <pre><code>function launchProjectWizard(data)  {
          var source;
          var template;
  
          $.ajax({
              url : '/assets/templates/handlebars/projectWizard.handlebars',
              cache : true,
              dataType: "json",
              success : function(temp) {
                  source = temp;
                  template = Handlebars.compile(source);
  
                  $.fancybox({
                      afterLoad : function() {
                          this.content = Handlebars.compile(this.template(JSON.parse(data)));
                      }
                  }); //fancy
              }
          }); //ajax
      }
  </code></pre>
  
  <p>I'm not getting any errors currently. But nothing is happening, either. Fancybox isn't initiating, no error is thrown, nothing. The call before, that saves the project to the db, is working fine.</p>
  
  <p>When I remove the "dataType" line, however, I do get Fancybox to fire off, but have the issue of it simply dumping the raw handlebars template in for its content, no compiling.</p>
  
  <p>Is there an easier or better way to handle a modal wizard process in Codeigniter with these support technologies? Should I leave Handlebars out of it for this one?</p>
  
  <p>Thanks for any assistance,</p>
  
  <hr>
  
  <p><strong>EDIT 1:</strong>
  I'm getting this output in the console for my <code>data</code> object being passed into the function. Is Handlebars tripping up because of the <code>team</code> Array instead of Object? Yet it's not throwing any errors..</p>
  
  <p><code>Object {title: Object, team: Array[2], pid: 179}</code></p>