# Not able to use javascript in Dataset

**URL:** https://community.xibo.org.uk/t/not-able-to-use-javascript-in-dataset/14819
**Category:** Get Help
**Created:** [June 24, 2018, 10:19am UTC](https://community.xibo.org.uk/t/not-able-to-use-javascript-in-dataset/14819 "2018-06-24T10:19:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Dirovinod](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@Dirovinod](https://community.xibo.org.uk/u/Dirovinod)
#### Post date: [June 24, 2018, 10:19am UTC](https://community.xibo.org.uk/t/not-able-to-use-javascript-in-dataset/14819/1 "2018-06-24T10:19:08Z")

</div>

Hi ,  
I am trying to create a data set of 2 columns with String Data type. I am trying to add a custom javascript so that rows loop continuously in the display. ie, First row should re-appear after the last row in the table and it should continue.

Here is the my javascript

function moveRows(){  
firstTR = $(‘tbody tr’).first();  
firstTR.animate({opacity:0},  
function(){$(‘tbody’).append(firstTR);});  
firstTR.animate({opacity:1});  
}

function EmbedInit() {  
setInterval(function(){  
moveRows();  
},1000);  
}

However the above script seems to make any difference … The same script works if I use an embed html widget (of course with a custom html sample data)

Any help / pointers please ? many thanks…

---

<div class="post-metadata">

### Author: ![system](https://community.xibo.org.uk/uploads/default/original/2X/a/a8759c2d8cc561474733895ac75beeb830f5d8ca.png) [@system](https://community.xibo.org.uk/u/system)
#### Post date: [March 4, 2020, 5:11pm UTC](https://community.xibo.org.uk/t/not-able-to-use-javascript-in-dataset/14819/2 "2020-03-04T17:11:25Z")

</div>


