Hice estos cambios pero no he logrado que cumpla su objetivo.
Código Javascript
:
Ver original$(document).ready( function() {
var $barrio_path = "images/barrio/";
var $barrio = [
"hipodromo",
"rio",
"catedral",
"restaurante",
"zona_comercial",
"tren",
"salud",
"panamericana",
"mapa",
"shopping"
];
var $amenity_path = "images/amenity/";
var $amenity = [
"pileta",
"gim",
"parque",
"internet",
"solarium",
"microcine",
"guarderia",
"seguridad",
"sum",
"sauna",
"parking",
"tv",
"laundry",
"juegos",
"cocheras",
"vestuario"
];
var $ext = ".jpg";
var $img = "#coleccion img";
var $barrio_path = "images/barrio/";
var $amenity_path = "images/amenity/";
var $ext = ".jpg";
var $img = "#coleccion img";
$(".opt").click( function() {
for(var $i = 0; $i < $barrio.lenght; $i++) {
if ($barrio[$i]) { $($img).change().attr({ src: $barrio_path + $barrio[$i] + $ext }); }
break;
}
});
});