Advertisement
Guest User

Untitled

a guest
Jul 14th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var myProjects = {
  2.     projects: null,
  3.    
  4.     getProjects: function() {
  5.         // lets say json works, just add result manually
  6.         myProjects.projects = [
  7.         {
  8.             "projectId": "932713684f9073189ec7b",
  9.             "projectName": "Cloud859Collective",
  10.             "startDate": "April 19th, 2012",
  11.             "finishedDate": "April 25th, 2012",
  12.             "createdFor": "ClasskCreations",
  13.             "contributors": "Mike Grigsby",
  14.             "projectDesc": "This website was created with a friend in mind. His name is Kevin Johnson and he is a rapper. He needed a website that would allow him to host and share his music."
  15.         },
  16.         {
  17.             "projectId": "10599012654f907093714e9",
  18.             "projectName": "Nurbell Studio",
  19.             "startDate": "April 15th, 2012",
  20.             "finishedDate": "April 19th, 2012",
  21.             "createdFor": "Nurbell LLC",
  22.             "contributors": "Mike Grigsby",
  23.             "projectDesc": "This is the page you are currently looking at. This is the official Nurbell homepage. Complete with a frontend and a backend."
  24.         }
  25.     ];
  26.     },
  27.  
  28.     placeProjects: function() {
  29.         if (myProjects.projects === null) {
  30.             myProjects.getProjects();
  31.         }  
  32.         $.each(myProjects.projects, function(i,e){
  33.             $("#content").fadeOut(150, function() {
  34.                 $(this).replaceWith(projectsSlider(e.projectId, e.projectName, e.startDate, e.finishedDate, e.projectDesc, e.createdFor, e.contributors, e.screenshotURI, e.websiteURL), function() {
  35.                     $(this).fadeIn(150);
  36.                 });
  37.             });
  38.         });
  39.     }
  40.     }
  41. } $("#projects").click(myProjects.placeProjects());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement