jquery - $('.block').height($(this).width()); causing block height extend -
i trying set block's height equal width $('.block').height($(this).width());
it's not working reason. please see example: http://jsfiddle.net/uy3yb/. need correct?
$('.block').height(function () { return $(this).width(); });
.height( function(index, height) )
a function returning height set. receives index position of element in set , old height arguments. within function, refers current element in set
problem code
this
below window
object not $('.block')
$('.block').height($(this).width());
Comments
Post a Comment