Copy background from one element to another using jQuery not working in firefox
css, firefox, javascript, jquery
Solution
Try the following:
$('.select').on('click', function(event){
$('.result').css('background', $(event.target).css('background-image'));
});
Problem
Here's a jsfiddle - http://jsfiddle.net/XcC5d/1/ ``` $('.select').on('click', function(event){ $('.result').css('background', $(event.target).css('background')); }); ``` When clicking on any of the first 3 .select divs, it copies the background css value and sets it to the result with the red border. This works in safari and chrome but not in firefox. Any help would be greatly appreciated.