CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 1: | Line 1: | ||
function importScientific(){ | function importScientific(){ | ||
+ | /* Sub section 1 */ | ||
$.ajax({ | $.ajax({ | ||
− | "url": 'https://static.igem.org/mediawiki/2017/ | + | "url": 'https://static.igem.org/mediawiki/2017/0/0c/Greekom_subsection1.txt', |
"type": "GET", | "type": "GET", | ||
"dataType": "text", | "dataType": "text", | ||
Line 8: | Line 9: | ||
"data": {} | "data": {} | ||
}).done(function(data, textStatus, jqxhr) { | }).done(function(data, textStatus, jqxhr) { | ||
− | + | ||
− | + | /* General - Execute once */ | |
$('#label').html('At a glance'); | $('#label').html('At a glance'); | ||
+ | $('#mode').val('simple'); | ||
$('#label').css('right', '199px'); | $('#label').css('right', '199px'); | ||
+ | |||
+ | /* Header */ | ||
+ | $('#sub_header_1').html('Bio-logical Information Processing'); | ||
+ | |||
+ | /* Section */ | ||
+ | $('#sub_section_1').html(data); | ||
+ | |||
console.log('This is from console alone' + data); | console.log('This is from console alone' + data); | ||
+ | }).fail(function(jqxhr, textStatus, errorThrown) { | ||
+ | //Write code to be executed when the request FAILS. | ||
+ | }); | ||
+ | |||
+ | /* Image 1 */ | ||
+ | $.ajax({ | ||
+ | "url": 'https://static.igem.org/mediawiki/2017/3/36/Greekom_image1.png', | ||
+ | "type": "GET", | ||
+ | "dataType": "text", | ||
+ | "timeout": 10000, | ||
+ | "data": {} | ||
+ | }).done(function(data, textStatus, jqxhr) { | ||
+ | |||
+ | /* Section */ | ||
+ | $('#image_1').attr({'src':data}); | ||
+ | |||
+ | }).fail(function(jqxhr, textStatus, errorThrown) { | ||
+ | //Write code to be executed when the request FAILS. | ||
+ | }); | ||
+ | |||
+ | /* Sub section 2 */ | ||
+ | $.ajax({ | ||
+ | "url": 'https://static.igem.org/mediawiki/2017/d/d0/Greekom_subsection2.txt', | ||
+ | "type": "GET", | ||
+ | "dataType": "text", | ||
+ | "timeout": 10000, | ||
+ | "data": {} | ||
+ | }).done(function(data, textStatus, jqxhr) { | ||
+ | |||
+ | /* Section */ | ||
+ | $('#sub_section_2').html(data); | ||
+ | |||
}).fail(function(jqxhr, textStatus, errorThrown) { | }).fail(function(jqxhr, textStatus, errorThrown) { | ||
//Write code to be executed when the request FAILS. | //Write code to be executed when the request FAILS. |
Revision as of 05:13, 23 October 2017
function importScientific(){
/* Sub section 1 */
$.ajax({ "url": 'https://static.igem.org/mediawiki/2017/0/0c/Greekom_subsection1.txt', "type": "GET", "dataType": "text", "timeout": 10000, "data": {}
}).done(function(data, textStatus, jqxhr) {
/* General - Execute once */
$('#label').html('At a glance'); $('#mode').val('simple'); $('#label').css('right', '199px');
/* Header */
$('#sub_header_1').html('Bio-logical Information Processing');
/* Section */
$('#sub_section_1').html(data);
console.log('This is from console alone' + data);
}).fail(function(jqxhr, textStatus, errorThrown) {
//Write code to be executed when the request FAILS.
});
/* Image 1 */
$.ajax({ "url": 'https://static.igem.org/mediawiki/2017/3/36/Greekom_image1.png', "type": "GET", "dataType": "text", "timeout": 10000, "data": {}
}).done(function(data, textStatus, jqxhr) {
/* Section */
$('#image_1').attr({'src':data});
}).fail(function(jqxhr, textStatus, errorThrown) {
//Write code to be executed when the request FAILS.
});
/* Sub section 2 */
$.ajax({ "url": 'https://static.igem.org/mediawiki/2017/d/d0/Greekom_subsection2.txt', "type": "GET", "dataType": "text", "timeout": 10000, "data": {}
}).done(function(data, textStatus, jqxhr) {
/* Section */
$('#sub_section_2').html(data);
}).fail(function(jqxhr, textStatus, errorThrown) {
//Write code to be executed when the request FAILS.
});
$('#Description').removeClass('grayscale');
}
function importGeneral(){
$.ajax({ "url": 'https://static.igem.org/mediawiki/2017/2/24/GreeKom_front.txt', //'https://static.igem.org/mediawiki/2017/2/23/Front.txt', "type": "GET", "dataType": "text", "timeout": 10000, "data": {}
}).done(function(data, textStatus, jqxhr) {
$('#description_content').html(data); $('#mode').val('scientific'); $('#label').html('In depth'); $('#label').css('right', '210px'); console.log('This is from console alone' + data);
}).fail(function(jqxhr, textStatus, errorThrown) {
//Write code to be executed when the request FAILS.
});
$('#Description').addClass('grayscale');
}