jQuery val not working properly in Chrome

Posted by Mircea on Stack Overflow See other posts from Stack Overflow or by Mircea
Published on 2010-05-27T10:08:22Z Indexed on 2010/05/27 10:11 UTC
Read the original article Hit count: 361

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about value