javascript - jQuery resize() event not firing on input resize. Alternate solution? -


this question has answer here:

as title says, jquery event resize() not firing when width of input box changes. according jquery api documentation, resize event sent (window) handler. question is, other solution have listen resize event.

i'm using transition attribute in css, rather using jquery animate alter inputs width. it's cleaner , smoother in css, keep so. if has other solutions, please list them below.

my first attempt this

$('input').resize(function() {     $(this).val('resize? nope!'); }); 

here fiddle resize event: http://jsfiddle.net/yw9ct/

the resize() method in jquery elements can manually resized user. resizing element using javacript/jquery, not firing event...

you can either create own event, or use textarea.

update

after looking @ jsfiddle, issue clear. resizing input using css3 method. not trigger jquery events, better off handling animation jquery.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -