This commit is contained in:
2019-07-16 01:03:26 +02:00
parent c66917c9a0
commit 8c9e1bc509
242 changed files with 5638 additions and 1288 deletions
+27 -8
View File
@@ -1,14 +1,33 @@
var $Sba = $('.sidebar-right a');
var $Sbsvg = $('.sidebar-right svg');
var $culturelle = $('#text_figli p > a:nth-of-type(3)');
function addclass() {
$Sba.hover(function() {
$(this).addClass("hover");
}, function() {
$(this).removeClass("hover");
function ajax() {
$.ajax({
url : 'projets/culturelle.html', // La ressource ciblée
type : 'GET', // Le type de la requête HTTP
dataType:'html',
success: function(data) {
$(data).find('.card').insertAfter($culturelle);
}
});
}
function deploy() {
$culturelle.click(function(e){
$(this).addClass('marg');
e.preventDefault()
var $detectCard = $('#text_figli > p > .card');
if ($detectCard[0]) {
console.log(true);
$(".card").remove();
$(this).removeClass("marg");
}else{
console.log(false);
ajax();
}
});
}
jQuery(document).ready(function($){
addclass();
deploy();
});