Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
120 lines (112 sloc) 3.7 KB
layout: page
title: Scrivimi
date: 2006-01-11 00:01:00 +0100
url: /contact-me
title: Scrivimi
weight: -70
<script src='/assets/spin.js'></script>
<div id="disablingDiv" ></div>
$(function() {
$.get( "", function( data ) {
$(function() {
// this is the id of the form
$("#actualForm").submit(function(e) {
e.preventDefault(); // avoid to execute the actual submit of the form.
var form = $(this);
var url = form.attr('action');
var opts = {
lines: 13, // The number of lines to draw
length: 38, // The length of each line
width: 17, // The line thickness
radius: 45, // The radius of the inner circle
scale: 1, // Scales overall size of the spinner
corners: 1, // Corner roundness (0..1)
color: '#ffffff', // CSS color or array of colors
fadeColor: 'transparent', // CSS color or array of colors
speed: 1, // Rounds per second
rotate: 0, // The rotation offset
animation: 'spinner-line-fade-quick', // The CSS animation name for the lines
direction: 1, // 1: clockwise, -1: counterclockwise
zIndex: 2e9, // The z-index (defaults to 2000000000)
className: 'spinner', // The CSS class to assign to the spinner
top: '50%', // Top position relative to parent
left: '50%', // Left position relative to parent
shadow: '0 0 1px transparent', // Box-shadow for the lines
position: 'absolute' // Element positioning
var target = document.getElementById('contactForm');
var spinner = new Spinner(opts).spin(target);
var serializedData = form.serialize();
type: "POST",
url: '',
data: serializedData, // serializes the form's elements.
success: function(data)
if (data == 'Email sent') {
} else {
error: function()
alert("error"); // show response from the php script.
<div id='contactForm'>
<div id="error" style="display: none;">
Ops, qualcosa &egrave; andato storto. Prova a correggere il seguente errore e a ritentare:<br/><br/><br/>
<span id="errorMessageTxt">errorEmpty</span>
<div id="sent" style="display: none;">
Grazie per il tuo messaggio! Se non sei uno spammer robot ti arriver&agrave; una risposta in breve tempo!<br />
<form id='actualForm' method='post' action=''>
<li id="form-to">
<li id="form-name">
<label>Da (email):</label>
<input type="text" name="email" />
<input type="text" name="name" style="display: none;"/>
<li id="form-message">
<textarea name="message"></textarea>
<li id="form-notice">
<strong>&Egrave; OK:</strong> essere gentili, usare il proprio nome.<br />
<strong>Non &egrave; OK:</strong> essere cafoni, invare spam.
<li id="form-buttons">
<button type="submit">Invia</button>