Hello so im trying to make a button that does two thing at the same time
function clickimageone(l){
alert("test");
question1button1 = true;
}
}
.border1{
border: 1px solid red;
}
.border2{
border: 1px solid red;
}
.border3{
border: 1px solid red;
}
.border4{
border: 1px solid red;
}
.image{
float: left;
}
<div class="image"><img src="img/500.png" onclick="clickimageone()" class="border1" style="height: 500px; max-height: 150px; max-width: 300px; top: 50px; left: 50px"></div>
<div class="image"><img src="img/1000.png" onclick="clickimagetwo(this)" class="border2" style="height: 500px; max-height: 150px; max-width: 300px; top: 50px; left: 100px"></div>
<div class="image"><img src="img/1500.png" onclick="clickimagethree(this)" class="border3" style="height: 500px; max-height: 150px; max-width: 300px; top: 50px; left: 150px"></div>
<div class="image"><img src="img/2000.png" onclick="clickimagefour(this)" class="border4" style="height: 500px; max-height: 150px; max-width: 300px; top: 50px; left: 200px"></div>
<script>
$('.border1').click(function(e){
$('.image, .border1, .border2, .border3, .border4').fadeOut('slow', function(){
$('.image, .border2').fadeIn('slow');
});
});
</script>
So basically when people press on the image it will execute jquery to fade in and out some stuff and at the same time to execute a java function to alert users. So my question is can i make it so when the user click on the image it will fade out the picture and fade in a new picture and also alert the user at the same time.