Storing variable inside the tag and retrive in the jquery

Storing variable inside the tag and retrive in the jquery

Storing variable inside the tag and retrive in the jquery




HTML


<button class='export'  data-que='$queempty' data-name='$name' data-type='$type' data-id='$aaa'> Export</button>


JQuery:


$(".export").on("click",function()
{
    data = $(this).data();
    var type =   data.type;
    var id= data.id;     OR var id= data["id"];     
    var name = data.name;
    var que =data.que;
  
}


0 Response to "Storing variable inside the tag and retrive in the jquery"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel