[Solved] Get value using data [closed]


Your are trying to get attribute, use attr() for it with complete name of attribute:

var name = "data-cityid";    
alert($("#myid").attr(name)); 

Here is demo

1

solved Get value using data [closed]