Opened 11 years ago
Closed 11 years ago
#10672 closed bug (worksforme)
attr() no return value
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Dear jQuery Team!
I found a bug: attr() no return value.
Test:
html <input type="button" name="test_button">
jQuery $("input").click(function(){
var type = $(this).attr('type');
name = $(this).attr('name');
alert("Type: "+type+" & Name: "+name);
});
return: "Type: undefined & Name: undefined"
Thank: Barnabás Bartha [email protected]…
Note: See
TracTickets for help on using
tickets.
Whoops, i deleted my earlier comment, misread the example.
http://jsfiddle.net/dmethvin/4qTmX/