У меня есть родительская страница parent.html
, как показано ниже для вызова colorbox:
<script src="colorbox/jquery.min.js"></script>
<script src="colorbox/jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
$(".example7").colorbox({
width:"60%",
height:"40%",
iframe:true
});
//How I can get Parameters from ColorBox when ColorBox closed
</script>
<body>
<p><a class='example7' href="demo_01.html">Click here to open Colorbox</a></p>
</body>
А на demo_01.html
у меня есть 2 изображения
<html>
<script type="text/javascript">
function onChooseAndClose(val){
//how to setup to sent paramters (ID of image was chosen) to parent page before close colorbox
......
//close this Colorbox
parent.$.fn.colorbox.close()
}
</script>
<body>
<img src="imamges/img1.png" id="idImg1" onclick="javascript:onChooseAndClose('idImg1');" />
<img src="imamges/img2.png" id="idImg2" onclick="javascript:onChooseAndClose('idImg2');" />
</body>
</html>
In parent.htmlКак я могу получить параметры из ColorBox когда ColorBox закрыт
Спасибо.