forked from codex-academy/codeX_BlogTeamKusinda
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathblog1.js
More file actions
23 lines (17 loc) · 757 Bytes
/
blog1.js
File metadata and controls
23 lines (17 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function save(){
var fieldValue1 = document.getElementById('PostHeading').value;
localStorage.setItem('Heading', fieldValue1);
};
$('document').ready(function(){
console.log("We are live!");
$('#ButtonPost').click(function(){
console.log('waddup');
window.location.href='index.html';
});
$('#refresh').click(function(){
console.log(localStorage.getItem('Heading'));
$('#ContentItemsHome').animate({height: "+=150px"});
$('#ContentItemsHome').append("<div id='BlogSnippet'><img src ='Images/tumblr_inline_nbyfyx3TaW1rvzuyz.jpg' id='BlogPicture2'><div id='SummaryHeader'><center><h2 class='headers'>"+localStorage.getItem('Heading')+"</h2></center></div></div> ");
$('#ContentBlockHome').animate({height: "+=150px"});
});
});