Ticket #11618 (closed bug: worksforme)
attr bug in development version
| Reported by: | TobiDE | Owned by: | TobiDE |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | attributes | Version: | 1.7.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
hey guys i found a little bug in the development version of jquery. I'm new in learning jquery and it was very confusion when I was using the .attr() method. In my example with jquery 1.4.1 it was working, but with the 1.7.2 dev version it doesn't. After this I used the production code and everything worked fine.
example code:
$(document).ready(function(){
$("#toggle1").click(function(){
$("img").attr({
src: "b1.png"
});
});
});
Change History
comment:1 Changed 13 months ago by sindresorhus
- Owner set to TobiDE
- Status changed from new to pending
comment:2 Changed 13 months ago by TobiDE
- Status changed from pending to new
ok here is the code: http://jsfiddle.net/faYAF/8/ The code is working with jQuery 1.7.2 and jQuery Edge, but I get the problem, when I use jQuery development code from the jQuery page. The production code is working without any issue ;)
comment:3 Changed 13 months ago by dmethvin
- Status changed from new to pending
What is the URL of the jQuery code you are using? Or are you building your own copy?
comment:4 Changed 13 months ago by anonymous
i was using this code: http://code.jquery.com/jquery-1.7.2.js
comment:5 Changed 13 months ago by dmethvin
That is the released version. Can you describe the behavior you are seeing, and how it differs from the behavior you expect? I do not see a difference between 1.4.4 and 1.7.2 for example.
comment:6 Changed 13 months ago by TobiDE
- Status changed from pending to new
if i use the developer code, the picture isn't loading.There was no difference in the code, when i clicked a button.After i used the production code the picture is loading and firebug showed me the changes in the code ;).
comment:7 Changed 13 months ago by dmethvin
I am sorry but I do not understand.
if i use the developer code, the picture isn't loading.
The picture doesn't load until you click a button.
There was no difference in the code, when i clicked a button.
Then the code is working?
After i used the production code the picture is loading and firebug showed me the changes in the code
What changes?
As I understand it, the link you provided http://jsfiddle.net/faYAF/8/ is to a page that works as you expected. Can you provide a link to a page that does not work as you expected, and describe a sequence of actions required to see it not work?
comment:8 Changed 13 months ago by rwaldron
- Priority changed from undecided to low
- Resolution set to worksforme
- Status changed from new to closed
- Component changed from unfiled to attributes
The current code example doesn't display any issues - please see the forum for support https://forum.jquery.com/getting-started
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.