Team:UCL Academy/js/initjs

From 2013hs.igem.org

(Difference between revisions)
(Created page with "$(document).ready(function(){ $('#wikimenutoggleon').click(function(){ $('#top-section').show(); $('#wikimenutoggleoff').show(); $('#wikimen...")
 
(15 intermediate revisions not shown)
Line 1: Line 1:
$(document).ready(function(){
$(document).ready(function(){
-
     $('#wikimenutoggleon').click(function(){  
+
     $('<iframe />', {
-
          $('#top-section').show();
+
    src: 'http://www.synbiosoc.org/igemhs/' + window.location.hash.substr(1),
-
          $('#wikimenutoggleoff').show();
+
    id:  'injectedcontent'
-
          $('#wikimenutoggleon').hide();
+
}).appendTo('body');
-
      });
+
-
$('#wikimenutoggleoff').click(function(){  
+
    $("#injectedcontent").ready(function () {  
-
          $('#top-section').hide();
+
        $("a[href^='http://synbiosoc.org/igemhs/']", frames['injectedcontent'].document).each(function()
-
          $('#wikimenutoggleoff').hide();
+
  { alert("ja");
-
          $('#wikimenutoggleon').show();
+
 
-
      });
+
 
 +
      this.href = this.href.replace("http://synbiosoc.org/igemhs/",
 +
        "https://2013hs.igem.org/Team:UCL_Academy/#");
 +
      this.target = "_parent";
 +
      window.location.reload();
 +
  });
 +
    });
 +
});

Latest revision as of 19:56, 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()
  { alert("ja");


     this.href = this.href.replace("http://synbiosoc.org/igemhs/", 
        "https://2013hs.igem.org/Team:UCL_Academy/#");
     this.target = "_parent";
     window.location.reload();
  });
   });

});