I would like to know how to declare a variable in jQuery
The code I am currently using is
$.name = \'anirudha\'; alert($.name);
That co
You can also use text() to set or get the text content of selected elements
text()
var text1 = $("#idName").text();
Try this :
var name = $("#txtname").val(); alert(name);