[jQuery] Re: Can't get .attr to work in chrome

2009-10-14 Thread MorningZ
$('img').attr({onclick: "Image_Click(src)"}); $('img').css("cursor", "pointer"); to $('img').css("cursor", "pointer").click(function() { Image_Click (this.src); }); And I may be mistaken, but i *think* that the modal needs to be added to the DOM *before* it can be called as a modal popup... i

[jQuery] Re: Can't get .attr to work in chrome

2009-10-14 Thread Leonardo K
Use the click event: http://docs.jquery.com/Events/click#fn On Wed, Oct 14, 2009 at 01:23, Curtis Ovard wrote: > > Here is the code > $(document).ready(function(){ >$('img').attr({onclick: "Image_Click(src)"}); >$('img').css("cursor", "pointer"); > }); > > function Image_Click(sr