Remove unnecessary code
This commit is contained in:
@@ -1,31 +1,6 @@
|
||||
// set page title
|
||||
window.page_title = "Computer Science Blog | Matthew Grove";
|
||||
|
||||
function nextPage() {
|
||||
// if there are more slides to come, display the next one
|
||||
if (window.current_blog_page < window.pages.length) {
|
||||
displayPage(window.pages[window.current_blog_page + 1]);
|
||||
} else {
|
||||
// if end of presentation has been reached, display the first slide
|
||||
displayPage(window.pages[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function previousPage() {
|
||||
// if there are more slides before the current one, display the previous slide
|
||||
if (window.current_blog_page >= 1) {
|
||||
displayPage(window.pages[window.current_blog_page - 1]);
|
||||
} else {
|
||||
// if end of presentation has been reached, display the first slide
|
||||
displayPage(window.pages[window.pages.length - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
function displayPage(page) {
|
||||
// document.getElementById("iframe").src = "pages/" + page + ".html";
|
||||
$("#presentation").load(page);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
// set the current date
|
||||
var date = new Date();
|
||||
@@ -39,6 +14,9 @@ window.onload = function() {
|
||||
// display date
|
||||
$("#current_date").html(current_date);
|
||||
|
||||
// display first blog page
|
||||
$("#blog-insert").load("pages/blog.html");
|
||||
|
||||
// define variables for HTTP presentation pages
|
||||
http_pages = ["hyperlinks", "http", "https", "cookies"];
|
||||
// displays HTTP presentation pages
|
||||
@@ -46,10 +24,10 @@ window.onload = function() {
|
||||
$.get("pages/" + item + ".html", function(content) {
|
||||
if (index == 0) {
|
||||
$("#http_presentation .carousel-inner").append('<div class="item active">' + content + '</div>');
|
||||
$("#http_presentation .carousel-indicators").append('<li data-target="#http_presentation" class="active" data-slide-to="' + http_pages.indexOf(item) + '"></li>')
|
||||
$("#http_presentation .carousel-indicators").append('<li data-target="#http_presentation" class="active" data-slide-to="' + index + '"></li>')
|
||||
} else {
|
||||
$("#http_presentation .carousel-inner").append('<div class="item">' + content + '</div>');
|
||||
$("#http_presentation .carousel-indicators").append('<li data-target="#http_presentation" data-slide-to="' + http_pages.indexOf(item) + '"></li>')
|
||||
$("#http_presentation .carousel-indicators").append('<li data-target="#http_presentation" data-slide-to="' + index + '"></li>')
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -61,14 +39,11 @@ window.onload = function() {
|
||||
$.get("pages/" + item + ".html", function(content) {
|
||||
if (index == 0) {
|
||||
$("#html_presentation .carousel-inner").append('<div class="item active">' + content + '</div>');
|
||||
$("#html_presentation .carousel-indicators").append('<li data-target="#html_presentation" class="active" data-slide-to="' + html_pages.indexOf(item) + '"></li>')
|
||||
$("#html_presentation .carousel-indicators").append('<li data-target="#html_presentation" class="active" data-slide-to="' + index + '"></li>')
|
||||
} else {
|
||||
$("#html_presentation .carousel-inner").append('<div class="item">' + content + '</div>');
|
||||
$("#html_presentation .carousel-indicators").append('<li data-target="#html_presentation" data-slide-to="' + html_pages.indexOf(item) + '"></li>')
|
||||
$("#html_presentation .carousel-indicators").append('<li data-target="#html_presentation" data-slide-to="' + index + '"></li>')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// displays first blog page
|
||||
$("#blog-insert").load("pages/blog.html");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user