{{ maVariable }}
<p [title]="{'Mon titre': condition }">titre bindé par une variable</p>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const re = /^\w+([-+.'][^\s]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; | |
let myEmail = 'toto@tata.com'; | |
let emailFormat = re.test( myEmail ); | |
//retourne un boolean true/false | |
//si l'expression régulière n'est pas validée sur le contenu de la valeur du champ email... | |
if (!emailFormat) { | |
//declenche une erreur | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>Form verification</title> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Exercice Event mouseover-mouseout</title> | |
<style> | |
h1 { | |
padding: 40px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
**JavaScript est un langage événementiel** : le développeur a un contrôle limité sur le flux d'exécution du code, qui est déterminé principalement par les interactions avec l'environnement. Un 'event', est comme son nom l'indique l'événement qui se déclenche lors d'une interaction. | |
**Exemple d'events :** Activation d'un lien, clic/double-clic sur un élément, mouvement de la souris, chargement du contenu du document, modification d'un input/select de formulaire, soumission d'un formulaire, appui sur une touche du clavier de l'utilisateur… | |
Le développeur peut intercepter des events et s'en servir pour déclencher une fonction selon que cet evenement s'est produit ou non. Il peut aussi créer ses propres évenements. | |
**plusieurs niveau de gestion des events, et donc plusieurs syntaxes...** | |
* DOM niveau 0 (standard de facto) -> la plus largement supportée |
I hereby claim:
- I am washaweb on github.
- I am jeromeposlednik (https://keybase.io/jeromeposlednik) on keybase.
- I have a public key whose fingerprint is C72A A3D4 1133 CA79 009B 288E CCFE DBE4 7DD7 FAD2
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Return an alternate title, without prefix, for every type used in the get_the_archive_title(). | |
add_filter('get_the_archive_title', function ($title) { | |
if ( is_category() ) { | |
$title = single_cat_title( '', false ); | |
} elseif ( is_tag() ) { | |
$title = single_tag_title( '', false ); | |
} elseif ( is_author() ) { | |
$title = '<span class="vcard">' . get_the_author() . '</span>'; | |
} elseif ( is_year() ) { | |
$title = get_the_date( _x( 'Y', 'yearly archives date format' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background: linear-gradient(146deg, #001156, #cf3dd7, #0294bf); | |
background-size: 600% 600%; | |
-webkit-animation: gradientAnimation 48s ease infinite; | |
-moz-animation: gradientAnimation 48s ease infinite; | |
-o-animation: gradientAnimation 48s ease infinite; | |
animation: gradientAnimation 48s ease infinite; | |
@-webkit-keyframes gradientAnimation { | |
0%{background-position:1% 0%} | |
50%{background-position:99% 100%} | |
100%{background-position:1% 0%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Change custom login logo | |
*/ | |
function custom_login_title() { | |
return get_option('blogname'); | |
} | |
function custom_login_logo() { | |
echo '<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var sync1 = $("#sync1"); | |
var sync2 = $("#sync2"); | |
var slidesPerPage = 4; //globaly define number of elements per page | |
var syncedSecondary = true; | |
sync1.owlCarousel({ | |
items : 1, | |
slideSpeed : 2000, |