Difference between revisions of "Template:USTC-Software/js/addBackground"

 
Line 5: Line 5:
 
       }
 
       }
 
       changeBackground(){
 
       changeBackground(){
         $("body").css("background", "url('https://static.igem.org/mediawiki/2019/0/06/T--USTC-Software--lhr.svg') 0% 0% no-repeat/ cover");
+
         $("#HQ_page").css("background", "url('https://static.igem.org/mediawiki/2019/0/06/T--USTC-Software--lhr.svg') 0% 0% no-repeat/ cover");
 
       }
 
       }
 
       changePageCardOpacity(opacity=0.7){
 
       changePageCardOpacity(opacity=0.7){

Latest revision as of 13:56, 9 October 2019

$(document).ready(function () {

  class Background{
     constructor(){
     }
     changeBackground(){
        $("#HQ_page").css("background", "url('https://static.igem.org/mediawiki/2019/0/06/T--USTC-Software--lhr.svg') 0% 0% no-repeat/ cover");
     }
     changePageCardOpacity(opacity=0.7){
        $("div.card").css("background", "rgba(255, 255, 255, " + opacity + ")");
     }
  }
  let background = new Background();
  background.changeBackground();
  background.changePageCardOpacity(0.6);

});