Seb Duggan schrieb:
> Thanks Klaus.
> 
> Yes, I'm using jQuery 1.1.
> 
> However, this still doesn't seem to work. Try the sample code with a  
> longer caption, and this:
> 
> $('div.image p').click( function() {
> alert( $(this).width() );
> });
> 
> Now, clicking the caption will report its actual width. It's not  
> being limited to the width of the image...
> 
> 
> Seb

Stupid me, I forgot a return statement (too much Ruby lately)... and 
also the unit seems to be required:

$('div.image p').css('width', function() {
     return $(this).prev().width() + 'px';
});



-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to