wwfc
07-26-2016, 01:48 PM
hi all,
hoping that someone can answer a question for me - i am currently trying to get a bunch of divs to fade between each other when a link is clicked.
the basics seem to be working fine - but when i add more complex content to the divs - i seem to run into more problems.
this is the script i have
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$('#show2').click(function() {
$('#mirza1, #mirza3').fadeOut(500);
$('#mirza2').fadeIn(500);
});
$('#show3').click(function() {
$('#mirza1, #mirza2').fadeOut(500);
$('#mirza3').fadeIn(500);
});
$('#show1').click(function() {
$('#mirza2, #mirza3').fadeOut(500);
$('#mirza1').fadeIn(500);
});
});//]]>
</script>
and it all does what it says - but... when the div/content gets faded out it still seems to be responding to mouse movements. i have some mouse reactive content in the divs and on fadein they aren't where they should be - as if they have already been reacting to the mouse movement (if you know what i mean?)
is there anyway of adding some z-index reference to it - so when faded it drops to the lowest z-index level? or maybe hide and then remove from the stage altogether... (or would the latter mean that the divs content would need to reload? not just appear?)
hoping that someone can answer a question for me - i am currently trying to get a bunch of divs to fade between each other when a link is clicked.
the basics seem to be working fine - but when i add more complex content to the divs - i seem to run into more problems.
this is the script i have
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$('#show2').click(function() {
$('#mirza1, #mirza3').fadeOut(500);
$('#mirza2').fadeIn(500);
});
$('#show3').click(function() {
$('#mirza1, #mirza2').fadeOut(500);
$('#mirza3').fadeIn(500);
});
$('#show1').click(function() {
$('#mirza2, #mirza3').fadeOut(500);
$('#mirza1').fadeIn(500);
});
});//]]>
</script>
and it all does what it says - but... when the div/content gets faded out it still seems to be responding to mouse movements. i have some mouse reactive content in the divs and on fadein they aren't where they should be - as if they have already been reacting to the mouse movement (if you know what i mean?)
is there anyway of adding some z-index reference to it - so when faded it drops to the lowest z-index level? or maybe hide and then remove from the stage altogether... (or would the latter mean that the divs content would need to reload? not just appear?)