开发者

Display image array content with ColorBox

I'm trying to find on internet somethin similar but no good result. Here it goes what I want to do. I have several tables in MySQL. In each table there's many URLs containing many links to images on internet. I have some icons on index.php page, and what I want to do is that whenever you click on any icon, the program should be able to get the information from MySQL and pass all the data to Colorbox to show it as image slider.

For example:

Icon 1 -> Access MySQL -> get_Data_Table1 -> send_data_ColorBox -> showColorBoxdata1
Icon 2 -> Access MySQL -> get_Data_Table2 -> send_data_ColorBox -> showColorBoxdata2
Icon 3 -> Access MySQL -> get_Data_Table3 -> send_data_ColorBox -> showColorBoxdata3

I'm able to get the information from MySQL but I don't know how to pass an array to col开发者_Go百科orbox to show all the images of the array.

Any suggestion?

Thanks in advance


From what I can tell from the ColorBox site, it doesn't support JSON. What you could do is wrap the response JSON into HTML, and attach it to the DOM and then 'ColorBox' it.

You didn't mention if you have trouble with just ColorBoxing the JSON or if you're stuck with the PHP as well.

You might also want to take a look at this: Dynamic Colorbox galleries using Ajax

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜