Advertisement
Guest User

Untitled

a guest
Jul 14th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. var myProjects = {
  3.     projects: null,
  4.    
  5.     getProjects: function() {
  6.         jQuery.ajax({ type: "POST", dataType: "JSON",
  7.             url: "<?=base_url()?>index.php/home/projectsSlider",
  8.             json: {returned: true},
  9.             success: function(data) {
  10.                 if (data.returned === true) {
  11.                     myProjects.projects = data.projects;
  12.                 }
  13.             }
  14.         });
  15.     },
  16.  
  17.     placeProjects: function() {
  18.         if (myProjects.projects == null) myProjects.getProjects();
  19.  
  20.         $.each(myProjects.projects, function(i,e){
  21.             $("#content").fadeOut(150, function() {
  22.                 $(this).replaceWith(projectsSlider(
  23.                     e.projectId,
  24.                     e.projectName,
  25.                     e.startDate,
  26.                     e.finishedDate,
  27.                     e.projectDesc,
  28.                     e.createdFor,
  29.                     e.contributors,
  30.                     e.screenshotURI,
  31.                     e.websiteURL
  32.                 ), function() {
  33.                     $(this).fadeIn(150);
  34.                 });
  35.             });
  36.         });
  37.     },
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement