Hi
I want to write a function that detects when the fancyBox is closed and then fades-in a div container with the id "xyz".
I tried this, but it doesn't work. Can anybody help?
$(document).ready(function(){
$(window).bind("beforeunload",
function() {
$("div#xyz").fadeIn("slow");
});
});
thanks a lot
macangelo
when fancyBox is closed, another div should fadeIn [solved]
when fancyBox is closed, another div should fadeIn [solved]
Last edited by macangelo on Sat 8. Mar 2014, 18:41, edited 2 times in total.
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
http://eyelikeit.com/index.php?de_beispiele-webdesign
- Oliver Georgi
- Site Admin
- Posts: 9889
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: when fancyBox is closed, another div should fadeIn
That is the wrong way. Have a look: http://jsfiddle.net/slackero/d6TeL/4/
If you use the phpwcms-fancyBox you have to implement this to jquery.fancybox.initSwipeOn.js or jquery.fancybox.initSwipeOff.js
If you use the phpwcms-fancyBox you have to implement this to jquery.fancybox.initSwipeOn.js or jquery.fancybox.initSwipeOff.js
Re: when fancyBox is closed, another div should fadeIn
Hi
Thanks a lot. It works fine! Here's the complete code I put in the html-content part (if my client approves I'll later put the frontend view here):
Thanks a lot. It works fine! Here's the complete code I put in the html-content part (if my client approves I'll later put the frontend view here):
Code: Select all
<!-- JS: $(document).ready(function() {
var $showMe = $('#aktuelleAngebote');
$(".various").fancybox({
maxWidth : 850,
maxHeight : 700,
fitToView : false,
width : '70%',
height : '70%',
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none',
loop : false,
beforeLoad : function() {
$showMe.fadeOut('fast');
},
afterClose : function(current, previous) {
$showMe.fadeIn('slow');
}
});
});
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
http://eyelikeit.com/index.php?de_beispiele-webdesign