par
arnaud69 » 19 sept. 2014, 12:29
Tu vas recopier ce code stp : [javascript]$(function () {
$('a.folio').fancybox();
$('#portfolio').mixitup();
$('.nav-tabs a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
$('.navbar-nav a').click(function (e) {
e.preventDefault();
$(this).parent('li').toggleClass('active');
$(this).parent('li').siblings('.active').removeClass('active');
})
$('.header .navbar-nav a').smoothScroll();
$('#jump2top').css('bottom', '-100px');
$(window).scroll(function () {
var btn = $('#jump2top');
if ($(this).scrollTop() > 100) {
btn.stop().animate({ 'bottom': '0' }, 200);
} else {
btn.stop().animate({ 'bottom': '-100px' }, 200);
}
});
$('#jump2top').smoothScroll();
$('#contact_form').on('submit', function(e) {
$('#button-send').html('Sending E-Mail...');
e.preventDefault();
var $this = $(this);
var name = $('#name').val();
var email = $('#email').val();
var message = $('#message').val();
if(name === '' || email === '') {
alert('Les champs doivent êtres remplis');
} else {
$.ajax({
url: $this.attr('action'),
type: $this.attr('method'),
data: $this.serialize(),
dataType: 'json', // JSON
success: function(html) { // récup du json/php
alert(html); // affiche le
if (html.success == '1') {
$('#button-send').html('Mail envoyé');
$('#success').show();
}else {
$('#button-send').html('Mail en erreur');
$('#error').show();
}
}
});
}
});
});
function scrollTo(elem) {
$('body,html').animate({
scrollTop: elem.offset().top
}, 500);
}
function valemail(email) {
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}[/javascript]
Car du coup, il y a finalement un }); en trop.
Enregistre le document en UTF8 stp
Tu vas recopier ce code stp : [javascript]$(function () {
$('a.folio').fancybox();
$('#portfolio').mixitup();
$('.nav-tabs a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
$('.navbar-nav a').click(function (e) {
e.preventDefault();
$(this).parent('li').toggleClass('active');
$(this).parent('li').siblings('.active').removeClass('active');
})
$('.header .navbar-nav a').smoothScroll();
$('#jump2top').css('bottom', '-100px');
$(window).scroll(function () {
var btn = $('#jump2top');
if ($(this).scrollTop() > 100) {
btn.stop().animate({ 'bottom': '0' }, 200);
} else {
btn.stop().animate({ 'bottom': '-100px' }, 200);
}
});
$('#jump2top').smoothScroll();
$('#contact_form').on('submit', function(e) {
$('#button-send').html('Sending E-Mail...');
e.preventDefault();
var $this = $(this);
var name = $('#name').val();
var email = $('#email').val();
var message = $('#message').val();
if(name === '' || email === '') {
alert('Les champs doivent êtres remplis');
} else {
$.ajax({
url: $this.attr('action'),
type: $this.attr('method'),
data: $this.serialize(),
dataType: 'json', // JSON
success: function(html) { // récup du json/php
alert(html); // affiche le
if (html.success == '1') {
$('#button-send').html('Mail envoyé');
$('#success').show();
}else {
$('#button-send').html('Mail en erreur');
$('#error').show();
}
}
});
}
});
});
function scrollTo(elem) {
$('body,html').animate({
scrollTop: elem.offset().top
}, 500);
}
function valemail(email) {
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}[/javascript]
Car du coup, il y a finalement un }); en trop.
Enregistre le document en UTF8 stp