Difference between revisions of "Template:TUDelft/js/script"

(Creating script)
 
Line 1: Line 1:
 
(function () {
 
(function () {
 +
  var first = "igem";
 +
  var secon = "tudelft";
 +
  var third = "gmail";
 +
  var forth = "com";
 +
  var all = first + "." + secon + "@" + third + "." + forth;
 +
  var sall = " " + " " + all;
 +
  var ma = "ma" + "il";
 +
  var mm = ma + "to" + ":";
 +
  $(function () {
 +
    $("#mail-button").attr("href", mm + all);
 +
    $("#email").text(sall);
 +
  });
 
   $(function () {
 
   $(function () {
 
     $("#contact span").hide();
 
     $("#contact span").hide();

Revision as of 13:40, 24 April 2017

(function () {

 var first = "igem";
 var secon = "tudelft";
 var third = "gmail";
 var forth = "com";
 var all = first + "." + secon + "@" + third + "." + forth;
 var sall = " " + " " + all;
 var ma = "ma" + "il";
 var mm = ma + "to" + ":";
 $(function () {
   $("#mail-button").attr("href", mm + all);
   $("#email").text(sall);
 });
 $(function () {
   $("#contact span").hide();
   $("#contact li").hover(function () {
     $(this).find("span").animate({width: 'show'});
   }, function () {
     $(this).find("span").animate({width: 'hide'});
   });
 });

}()); function copyToClipboard(element) {

 var $temp = $("<input>");
 $("body").append($temp);
 $temp.val(element).select();
 document.execCommand("copy");
 $temp.remove();

}