Created
December 27, 2019 21:11
-
-
Save Fhernd/d6fd6ff19f46d04b7c2c98663284ed5c to your computer and use it in GitHub Desktop.
// Ejercicio 34: Aplicar una clase de estilo a múltiples elementos con addClass().
This file contains hidden or 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>jQuery - Ejercicios</title> | |
<link rel="stylesheet" href="css/styles.css"> | |
</head> | |
<body> | |
<h1 class="encabezado">jQuery - Ejercicio 34</h1> | |
<div id="contenido"> | |
<p>jQuery v. 3.2.1</p> | |
<p>JavaScript es génial</p> | |
<p>C# es un lenguaje de .NET</p> | |
<p>jQuery es una librería para JavaScript</p> | |
</div> | |
<br> | |
<h2 class="encabezado">jQuery - Ejercicio 34</h2> | |
<script src="js/jquery-3.4.1.min.js"></script> | |
<script src="js/ex034-script.js"></script> | |
</body> | |
</html> |
This file contains hidden or 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
// Ejercicio 34: Aplicar una clase de estilo a múltiples elementos con addClass(). | |
$(document).ready(() => { | |
$('.encabezado').addClass('features'); | |
}); |
This file contains hidden or 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
.highlight{ | |
font-style: italic; | |
background-color: #ffff00; | |
} | |
.features{ | |
font-style: italic; | |
background-color: crimson; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment