How to use colorbox module programmatically. Colorbox module provides with loading inline content, explained here: https://drupal.org/node/1971564. Since that didn't work for me, I tok a different approach.
Source code viewer
<script type="text/javascript"> (function($){$().ready(function(){ $('#colorbox-<?php echo $id; ?>').click(function(){ $(this).colorbox({ href: '<?php echo $orig_file_url; ?>', 'width': '1024px', 'height': '768px', open: true }); }); });})(jQuery); </script> <a id="colorbox-<?php echo $id; ?>" href="#"> <img src="<?php echo $thumb_file_url; ?>" /> </a>Programming Language: HTML