jQuery - get .css() value and append to a input value
jquery
Solution
Try
var h3 = $(".styler h3");
$('.myStyle input').each(function(){
this.value = h3.css(this.name);
})
Demo: Fiddle
Problem
I want get the following element style and append them to input value. append CSS property value to input `value`, where property is equal to input `name`. Here is my div from where I want to get style ``` <div class="styler"> <h3 style="color:#555;font-size:30px;font-family:'open sans';"> I am Heading </h3> </div> ``` And this is the input where I want to append my styles ``` <div class="myStyle"> <input name="color" /> <input name="font-size" /> <input name="font-family" /> </div> ```