-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.js
88 lines (73 loc) · 2.31 KB
/
home.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
$(document).ready(function(){
$('.sendbutton').click(function() {
var name = $('.name').val();
email = $(".email").val();
email_validation = /^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/;
message = $('.message').val();
if (name == '') {
$('.name').focus();
return false;
}else if(email == "" || !email_validation.test(email)){
$('.email').focus();
return false;
}else if(message == ""){
$('.message').focus();
return false;
}else{
var datos = 'name='+ name + '&email=' + email + '&message=' + message;
$.ajax({
type: 'POST',
url: 'contact.php',
data: datos
});
return false;
};
});
$.backstretch([
/*Change the images url for change the background images*/
/*Add your images to the images directory and background subdirectory*/
"images/riazor.jpg"
], {duration: 3000, fade: 1500});
$('#imgActivator').on({
mouseover: function(){
$('.imgLink').slideDown()
},
click: function(){
$('.imgLink').fadeOut(500)
}
});
$('.chart').easyPieChart({
barColor: '#00B1AB',
trackColor: '#cccccc',
scaleColor: false,
lineWidth: 10,
easing: 'easeOutBounce',
onStep: function(from, to, percent) {
$(this.el).find('.percent').text(Math.round(percent));
}
});
$('.carousel').carousel('cycle', {
interval: 5000
});
//Smooth Scroll
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
$('#tweets').tweecool({
username : '55proyects',
limit : 1, // Number of tweets to show
profile_image : false, // Show profile image
show_time : true // Show tweet time
});
});