Replace Default No Photo - Eagle

Jason Brass -

//Change Default No photo - listing
if (jQuery('#dealertrend-inventory-api').length){

var newImageUrl='NEW_IMAGE_URL';

if( jQuery('#eagle-listing').length){
  jQuery('.eagle-vehicle').each(function(){
   jQuery('.eagle-photo img').each(function(){
    if (jQuery(this).attr('src').match(/s_no_photo/i) !== null){
       jQuery(this).attr('src',newImageUrl);
    }
   });
	});

} else {
//detail
if( jQuery('#eagle-detail').length){

  jQuery('#eagle-images a').each(function(){
   if (jQuery(this).attr('href').match(/m_no_photo/i) !== null){
    jQuery(this).attr('href',newImageUrl);
    jQuery(this).children('img').attr('src',newImageUrl);
   }
  jQuery('.eagle-similar-photo a img').each(function(){ //Looks at similiar vehicles
   if (jQuery(this).attr('src').match(/s_no_photo/i) !== null){
    jQuery(this).attr('src',newImageUrl);}});
  });

}
}
}
Have more questions? Submit a request

Comments

Powered by Zendesk