jQuery val not working properly in Chrome
- by Mircea
I have a simple jQuery function:
$('#selectable1 span').live('mousedown', function() {
var ff = $(this).css("font-family");
$("#family").val(ff);
});
When a span element is clicked (mousedown) an input (#family) gets its font family value.
It works in FireFox but in Chrome it works only for font families composed from only one word. Georgia will work but Times New Roman will now.
You can see the code here:
http://jsfiddle.net/aLaGa/
or live at http://www.typefolly.com
What is wrong with this?
Thanx