'jQuery example'

This commit is contained in:
Arkadiusz Hypki 2024-03-25 15:56:30 +01:00
parent b31283df00
commit 23b9202759
1 changed files with 26 additions and 0 deletions

26
05_html_jQuery/web2.html Normal file
View File

@ -0,0 +1,26 @@
<html>
<header>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
</header>
<body>
<h1 class="first">TITLE</h1>
<h1 class="second">TITLE SECOND</h1>
</body>
<script type="text/javascript">
alert('Hello');
alert($('h1.second').html());
$('h1.first').html('CHANGED');
$( "h1" ).each(function( index ) {
alert( index + ": " + $( this ).text() );
});
</script>
</html>