Ticket #5536 (closed bug: worksforme)
attr() and val() problem with chrome and safari but works with FF
| Reported by: | alwaysbrasilian | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | unfiled | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hey i've been doing some work on FF it works great but when i went to test on Chrome/Safari it wouldn't work. In my program all div's are hidden but the first and after you press a input it collects the value of the input and it hides the first div and displays the next div to get it's input's value and so forth. The enclosed code displays the output via console.log()
<script language="JavaScript" type="text/javascript"> <!-- $(function() {
set(); function set(){
$("#answer").click(function(){
var answ = $(this).val();
console.log(answ);
}); }
}); --> </script>
<input type="button" id="answer" value="1" />
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

It seems to work for me with Safari 4 and Firefox 3.5 on Windows 7. It console.logs the value 1. If you're still seeing a problem it might be best to debug the problem in the forums. If the consensus is that it is truly a bug, please post a complete test case and explain what the expected output was. Also let us know the exact browser version and platform.