Applying a CSS property from one element over to another
I'm pretty sure this is really simple to do, and it's simply goes to show just how much work I have to do learning this... but I'm trying to run a function that reads the css property of an element and copies it over to another element on click.
I'm sure a huge part of my problem is that I'm still struggling to learn the correct syntax for things, but I'm sure it's framed like this:
- onClick: function() { (create var and set it as the value associated with "background-image" of current object)
- (apply the var as the value for "background-image" to #mydiv) }
I didn't want to post my ACTUAL attempt to code this, mostly out of shame. But I'm pretty certain that it's ridiculously incorrect.