Schizo Octopust is free One Page Portfolio Website Template. This theme is a fixed layout one page portfolio template with two columns. All of the information within the main content area is nested within a div with an id of “container”.
Learn web design is dedicated on sharing information about web design and development we share you learn.
Schizo Octopust is free One Page Portfolio Website Template. This theme is a fixed layout one page portfolio template with two columns. All of the information within the main content area is nested within a div with an id of “container”.

It used to be that shifting an image from grayscale to colored and vice-versa as you hover over it required 2 copies of the said image — one in grayscale and the other in color. But thanks to Darcy Clarke for the JavaScript & HTML 5 grayscale in this tutorial, this feat is easier and faster because the grayscale image is generated from the original source.
Click on the above image for the demo.
Steps:
|
document.addEventListener('keydown', function (event) {
var esc = event.which == 27,
nl = event.which == 13,
el = event.target,
input = el.nodeName != 'INPUT'
&& el.nodeName != 'TEXTAREA',
data = {};
if (input) {
if (esc) {
// restore state
document.execCommand('undo');
el.blur();
} else if (nl) {
// save
data[el.getAttribute('data-name')] = el.innerHTML;
// we could send an ajax request to
update the field
/*
$.ajax({
url:
window.location.toString(),
data: data,
type: 'post'
});
*/
log(JSON.stringify(data));
el.blur();
event.preventDefault();
}
}
}, true);
function log(s) {
document.getElementById('debug').innerHTML = 'value changed to: ' + s;
}
|