I am writing a small plugin for myself and somehow inside the plugin , I am not able to set the value of the elements attribute inside the plugin method. I am trying to set the data-sortasc attribute of th element and although in the console log it shows it set it never does when I look at elements and inspect it. What could I be doing wrong.
Here is code frag
sort: function () {
var $this = $(this), data = $this.data('tablerender');