mardi 28 mars 2017

How to add id as a variable in jquery while appending? [on hold]

for(var i=0;i<va;i++){
            var not=result2.data[i].unique_id;
            var matchname = result2.data[i].description;
            $("#matches").append("<br><p id='"+ not +"'></p><br>");
            $("#not").text("hello");
        }

Even after adding id='"+ not +" not showing. The output is not showing anything. I am pretty sure it is considering id as some name but not as variable. How to make id as variable. I am new to jquery, Please help me out. Thanks in advance for the answer.




Aucun commentaire:

Enregistrer un commentaire