문제

I have table in which when the points are dragged , the corresponding value in table gets updated.

But i have done it using switch statement and is getting quite complex.

Is there a way i can achieve same using simple jquery/Javascript code.

Here is FIDDLE DEMO

도움이 되었습니까?

해결책

I suppose you can have a function like this:

function updater(yv,xv){
   var num = xv.match(/^\d+/);
   $('#b'+num).html(yv);
}

Demo

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top