Skip to main content

Bug Tracker

Side navigation

#11618 closed bug (worksforme)

Opened April 22, 2012 10:31AM UTC

Closed April 23, 2012 04:21PM UTC

attr bug in development version

Reported by: TobiDE Owned by: TobiDE
Priority: low Milestone: None
Component: attributes Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
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"
                    });
                });
});
Attachments (0)
Change History (8)

Changed April 22, 2012 01:46PM UTC by sindresorhus comment:1

owner: → TobiDE
status: newpending

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.

Changed April 22, 2012 02:13PM UTC by TobiDE comment:2

status: pendingnew

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 ;)

Changed April 22, 2012 02:15PM UTC by dmethvin comment:3

status: newpending

What is the URL of the jQuery code you are using? Or are you building your own copy?

Changed April 22, 2012 02:33PM UTC by anonymous comment:4

Changed April 22, 2012 02:38PM UTC by dmethvin comment:5

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.

Changed April 22, 2012 02:48PM UTC by TobiDE comment:6

status: pendingnew

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 ;).

Changed April 22, 2012 02:58PM UTC by dmethvin comment:7

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?

Changed April 23, 2012 04:21PM UTC by rwaldron comment:8

component: unfiledattributes
priority: undecidedlow
resolution: → worksforme
status: newclosed

The current code example doesn't display any issues - please see the forum for support https://forum.jquery.com/getting-started