I use colorbox.js with a modal, that's loaded by ajax.
I get some errors
Uncaught RangeError: Maximum call stack size exceeded. you can check the test-side on http://selfmade01.bplaced.net/
Please use there the second button "modal load mit ajax geht jetzt bis auf colorbox"
Can anyone help?
Thanks a lot for any help.
Best regards.
Jürgen
Now it works fine.
I added this:
onOpen:function(){
$overflow = document.body.style.overflow;
document.body.style.overflow = 'hidden';
},
onClosed:function(){
document.body.style.overflow = $overflow;
$("#my-modal").modal('show');
//document.body.style.overflow = 'auto';
},
onComplete:function(){
$("#my-modal").modal('hide');
$.colorbox.resize();
modal").modal('hide');
and
modal").modal('show');
Works for me.
Best regards. }
I know this is an old question, but the solution is described in the answer by user2257275 here.
Basically set trapFocus to false and that should take care of the error:
.colorbox({
height: "320",
width: "300",
...
trapFocus: false
});
I had similar error - when I performing click on expanded colorbox or pushing Esc or other way to hide it jQuery (1.11.3) thrown "Maximum call stack size exceeded", seems colorbox has some bug ...
Since this question is in the top of google, I've decided to share simplest drop-in solution of this problem – replace "colorbox" with "lightbox" :D
http://lokeshdhakar.com/projects/lightbox2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With