TADS:Exercícios Fixação: 2016-01-28

De Wiki Cursos IFPR Foz
Ir para navegaçãoIr para pesquisar

Modifique o Código Abaixo para que o jquery esconda todos os elementos

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("selector").hide();
});
</script>
</head>
<body>

<h2>This is a heading</h2>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

</body>
</html>

Modifique o código abaixo para que ele esconda todos os elementos com id="test"

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("selector").hide();
});
</script>
</head>
<body>

<p>This is a paragraph.</p>
<p id="test">This is a paragraph with id="test".</p>

</body>
</html>

Modifique o código abaixo para que esconda todos os elementos da classe "test"

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("selector").hide();
});
</script>
</head>
<body>

<h2 class="test">This is a heading</h2>

<p class="test">This is a paragraph.</p>
<p>This is another paragraph.</p>

</body>
</html>

Modifique o código para que ele esconda todos os elementos do documento

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("selector").hide();
});
</script>
</head>
<body>

<h1>This is a heading</h1>
<h2>This is another heading</h2>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

<div>This is a div element.</div>
<button>This is a button</button>

</body>
</html>

Modifique o código abaixo para que ele esconda todos os elementos que tenham um atributo href.

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("selector").hide();
});
</script>
</head>
<body>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<a href="http://www.w3schools.com/html/">HTML Tutorial</a>
<a href="http://www.w3schools.com/css/">CSS Tutorial</a>

</body>
</html>

Modifique a Página abaixo para que esconda todas as linhas ímpares da tabela.

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("selector").hide();
});
</script>
</head>
<body>

<table border="1">
  <tr>
    <th>Company</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Berglunds snabbköp</td>
    <td>Sweden</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Mexico</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
    <td>Austria</td>
  </tr>
  <tr>
    <td>Island Trading</td>
    <td>UK</td>
  </tr>
</table>

</body>
</html>