sdecima / javascript-detect-element-resize

A Cross-Browser, Event-based, Element Resize Detection
MIT License
881 stars 151 forks source link

event target not returning correct index value in IE 10 and less #29

Open sagarchand opened 9 years ago

sagarchand commented 9 years ago

Hi,

I'm trying to get the index of the element (relative to its parent) that is being resized like below $('.myoptions li').resize(function(e) { var changedRow = $(this).index(), newHeight = $(this).height(); $('.dynamic-row-height'+changedRow).height(newHeight); })

This is working gr8 in chrome, FF& IE11. But in IE 10 and less the changedRow is always retured as -1 instead of the actual index value.

Any help would be much appreciated.

Thanks,