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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -