Issue related to using Split function in Famo.us -


i have small application in famo.us

i have following code..

draggable.on('update',function(data){         var pos =data.position;         var t = pos.split(","); }); 

in above code, data.position return result in x,y format, want check x value whether greater 0 or not. have used split function. doesn't work..

how use split , substring functions in famp.us

the problem data.position returns array , not string..

you following x position.. hope helps!

draggable.on('update',function(data){     var pos = data.position;     var x = pos[0];     var y = pos[1]; }); 

Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -