I've implemented a typewrite effect via javascript with the HTML code below

```
<a href="" class="typewrite" data-period="2000" data-type='[ "Hi, Im Si.", "I am Creative.", "I Love Design.", "I Love to Develop." ]'>

```

The typewriting effect uses the `data-type` attribute as the input of the text that will be written. It will write the first sentence `"Hi, Im Si."` then it will be deleted (always with typewriter effect) and the next sentence will be written, and so on. I've already the javascript to do that but it has nothing to do with what I need now.

I would like to have the content of the attribute `data-type` as a jquery variable.

Is there a way to add dynamically the content in the data-type attribute?

To add text in the HTML body via jquery I usually add a `<span class='name_class'></span>` and then with jquery `$(".name_class").html('text_to_insert');`

Is there a way to do something like that but editing the data-type class?