Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
98
rated 0 times [  105] [ 7]  / answers: 1 / hits: 16024  / 13 Years ago, wed, march 14, 2012, 12:00:00

I'm trying to update the shopping cart of my site upon closing a Fancybox instance. I'm using Fancybox 1.3.4. Assuming my function is valid, shouldn't the following work?



<script type=text/javascript>

$(function () {
$(a.ProductRollover).fancybox({
'padding':0,
'width': 785,
'height': 554,
'autoScale': false,
'type': 'iframe',
'onClosed': function() {
$('#cart_total').html(json['total']);
}
});
});

</script>


Thank you.


More From » fancybox

 Answers
23

Instead of using onClosed use beforeClose or afterClose. Find the API documentation under the Callbacks tab here http://fancyapps.com/fancybox/#docs.



Moreover, answer by Mottie over here Load new content in Fancybox on Fancybox onClosed event might be helpful.


[#86863] Monday, March 12, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ramseydeshaunc

Total Points: 30
Total Questions: 91
Total Answers: 103

Location: Palau
Member since Tue, May 30, 2023
1 Year ago
;