Team:UCL Academy/js/initjs

From 2013hs.igem.org

(Difference between revisions)
Line 4: Line 4:
     id:  'injectedcontent'
     id:  'injectedcontent'
}).appendTo('body');
}).appendTo('body');
 +
 +
    $("#injectedcontent").ready(function () {
 +
        $("a[href^='http://synbiosoc.org/igemhs/']", frames['injectedcontent'].document)..each(function()
 +
  {
 +
 +
      this.href = this.href.replace("http://synbiosoc.org/igemhs/",
 +
        "https://2013hs.igem.org/Team:UCL_Academy/#");
 +
      this.target = "_parent";
 +
      window.location.reload();
 +
  });
 +
    });
});
});

Revision as of 19:54, 11 June 2013

$(document).ready(function(){

    $('<iframe />', {
   src: 'http://www.synbiosoc.org/igemhs/' + window.location.hash.substr(1),
   id:   'injectedcontent'

}).appendTo('body');

   $("#injectedcontent").ready(function () { 
       $("a[href^='http://synbiosoc.org/igemhs/']", frames['injectedcontent'].document)..each(function()
  { 
     this.href = this.href.replace("http://synbiosoc.org/igemhs/", 
        "https://2013hs.igem.org/Team:UCL_Academy/#");
     this.target = "_parent";
     window.location.reload();
  });
   });

});