underscore.js - Get coordinates of jquery element array -


i want extract array of left coordinates (simply numbers) matched jquery array. similar this:

var array = element.nextall().position().left 

is there neat way of doing this, perhaps underscore?

so in case jquery array contains number of divs, each of them want jquery position() - object , extract left coordinate. resulting array contain numbers each of div's left coordinate.

please try code:

array = $(element.nextall()).map(function() {    return $(this).position().left; }).get(); 

please refer link


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

excel vba - VBA Proxy auto-configuration for http requests -

php - phpWord - Tables with borders in headers/footers -