@Gordon Assuming i want colorbox to be linked to every image with the class photos, i have to do something like
$("body").on("click", ".photos", function(event){
$(".photos").colorbox({rel:'photos', transition:"fade"});
});
Now if i want colorbox to be linked to every article with the class other_pictures i will have to copy the same code and replace photos with other_pictures, therefore i will have something like
$("body").on("click", ".other_pictures", function(event){
$(".other_pictures").colorbox({rel:'other_pictures', transition:"fade"});