.mydiv(style="background-image: url('"+pic+"');" onerror="this.style.background-image:url('http://www.naijaticketshop.com/images/default_profile.jpg'); ")
Although it is common to use onerror for placeholders, I'm experiencing issues with it working for background-image. Any advice on how to resolve this?