jQuery UI resizable width as a function of height -
with jquery resizable()
method how make
width = 31 + $('idname').height()
i'm re-sizing video player, controls 31 pixels, because many embedded videos controls re-sized unusable.
i'd go from, let's say:
620/378 (620/347+31)
to
310/189 (310/158+31)
sorry forgot mention, div id being accessed jquery resizable()
method, way video player (it's html5 object
element) being re-sized set height , width 100% in css file, allows re-size compared div object.
jquery ui resizable() makes element resizable, still need act on resize() event
based on first equation
$('#idname').resize(function() { $(this).width( 31 + $(this).height() ); });
but don't think give want.
it may better aspectratio parameter of resizable() , maybe need not worry event @ all
$( "#idname" ).resizable({ aspectratio: 620 / 378 });
Comments
Post a Comment