JavaScript update
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Ist jQery bereit?.
|
||||
$( document ).ready(function() {
|
||||
|
||||
//Konsolen-Test
|
||||
console.log( "jQuery ist bereit!" );
|
||||
|
||||
//Ausblenden / Einblenden
|
||||
$("#aus").click(function(){
|
||||
$(".box").fadeOut( 1500 );
|
||||
});
|
||||
$("#ein").click(function(){
|
||||
$(".box").show();
|
||||
});
|
||||
|
||||
//Animieren
|
||||
$("#anim").click(function(){
|
||||
$(".box").animate({
|
||||
marginLeft: "150px",
|
||||
opacity: 0.5
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Vendored
+2
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
|
||||
var greenbox = document.querySelector('.box');
|
||||
document.addEventListener('click', function (event) {
|
||||
|
||||
if (event.target.matches('#ein')) {
|
||||
greenbox.removeAttribute('hidden');
|
||||
greenbox.classList.add('fadeInDown');
|
||||
}
|
||||
|
||||
if (event.target.matches('#aus')) {
|
||||
greenbox.setAttribute('hidden', 'true');
|
||||
greenbox.classList.remove('fadeInDown');
|
||||
}
|
||||
|
||||
}, false);
|
||||
Reference in New Issue
Block a user