Hey, that's really great news! For some reason, I had it stuck in my
head that only .attr() and .filter() could take functions. If I had
only looked at my own book (jQuery Reference Guide), I would have
seen that .css() can do the same. D'oh!
A musician I know sometimes forgets the lyrics to his own songs when
he's performing live, so maybe I shouldn't feel like an idiot. But I
do. :s
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Nov 14, 2007, at 8:20 PM, Wizzud wrote:
$('#page').css('paddingTop',function(){ return '50px'; });
works perfectly for me! (v1.2.1)
(btw borderTop is not a particularly good example to choose because
it's a shorthand group of 3 other properties and, depending on the
browser being used, it may/may not have any affect)
On Nov 14, 1:57 pm, XASD <[EMAIL PROTECTED]> wrote:
It's expected behavior,look athttp://jquery.com/blog/2007/01/14/
jquery-birthday-11-new-site-new-docs/
:
<qoute>
You can now pass in a function as a value for an attribute or a css
property. The function is executed and its return value is set as the
value for the property.
</quote>
By the way,function is invoked(simple insert "alert" inside) but
returned value is not used.
On Nov 13, 7:26 pm, XASD <[EMAIL PROTECTED]> wrote:
functionin place of value for property dosen't work.
Thanks.