Skip to content
Extraits de code Groupes Projets
Valider 306db573 rédigé par Florence's avatar Florence
Parcourir les fichiers

Heart icon uptade + simple js code test

display heart icon only when connected
no effect   of js code between <script> 
parent 218c09e3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -8,13 +8,20 @@ include "header.php";
<!-- ADD TO FAVORITES JS CODE -->
<head>
<script src="ressources/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
<script type="text/javascript" src="ressources/js/jquery-2.2.4.min.js">
/*SIMPLE TEST CODE
$(document).ready(function(){
$("button").click(function() {
$("p").toggleClass("main");
}); */
// Favorite Button - Heart
$('.favme').click(function() {
$(this).toggleClass('active');
$(document).ready(function(){
$("button").click(function() {
$(this).toggleClass("active");
});
/* when a user clicks, toggle the 'is-animating' class */
$(".favme").on('click touchstart', function(){
$(this).toggleClass('is_animating');
......@@ -24,14 +31,20 @@ $(".favme").on('click touchstart', function(){
$(".favme").on('animationend', function(){
$(this).toggleClass('is_animating');
});
});
</script>
</head>
<!-- ADD TO FAVORITES STYLE -->
<link href="//s.w.org/wp-includes/css/dashicons.css?20150710" rel="stylesheet" type="text/css">
<style>
/* TEST STYLE */
.main {
font-size: 120%;
color: red;
}
html, body { height:100%; }
......@@ -150,16 +163,21 @@ html, body { height:100%; }
<?php } ?>
</td>
<?php if ($_SESSION["authent"]==1){?>
<!-- ADD TO FAVORITE BUTTON -->
<td>
<div class="flexbox">
<div class="fav-btn">
<!-- SIMPLE TEST CODE
<button>Click</button>
<p> test </p> -->
<span class="favme dashicons dashicons-heart"></span>
</div>
</div>
</td>
<?php }?>
</tr>
<?php } } ?>
</tbody>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter