Using Delegate() with table due to redraw preventing script from working

Using Delegate() with table due to redraw preventing script from working

milkshakebunnymilkshakebunny Posts: 1Questions: 1Answers: 0
edited May 2014 in Free community support

I have a datatable loaded by ajax and the script loads at the time the table exists within the dom, however any row beyond row 10 fails to work with my script from what i gather due to the 'draw()' function of datatables script.

I have tried using $.getscript on the 'fnDrawCallback' however this is inefficient as it loads the script multiple times based on the table being drawn and is just no good for what i require.

I noticed though that the best way for me to proceed would be with 'delegate()' however i cannot seem to get delegate to work with my script at all in respect to datatables not functioning correctly.

I have a js fiddle illustrating the code and what i have tried of which i thought would work but so far no joy.

http://jsfiddle.net/bluey/7yhYz/1/

Any advice would be greatly appreciated.
Many Thanks

@Milkshakebunny

This discussion has been closed.