How about making a variable out of $("#tag").val() and using that for the css variable?
$('#family').click(function() { value = $(this).val(); $('#tag').css('font-family', value); }); -----Original Message----- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mircea Sent: Wednesday, January 20, 2010 7:13 AM To: jQuery (English) Subject: [jQuery] Live function syntax Hi, I want to add a live event on a function. My function is: $("#family").click(function(){ $($("#tag").val()).css("font-family", $("#family").val()); }); I've tryed to add it like this: $("#family").live("click", function(){ $($("#tag").val()).css("font-family", $("#family").val()); }); but I get a "$("#family").live is not a function" FireBug error. How should I use it right? Thank you.