Try this one:

$('#photo' + photo.id).click(function() {
   $('#photo' + photo.id).css('border-color','#777');
});

On 25 дек, 01:17, adam <abreck...@gmail.com> wrote:
> I'm trying to change the border color of an image using it's id with
> jquery
> ( photo['id'] is passed in from a previous function )
> the id's of the photos are of the form 'photo239839'
>
>      $('#photo'+photo['id']+'').click(function(){
>            $('#photo'+photo['id']+'').css('border-color','#777');
>
>         });
>
> When i try to use this same code using it's class it works,
> but i can't use this method since there are multiple images on the
> same
> page with the same class
>
>     $('img.flickr_photo').click(function(){
>            $("this.flickr_photo").css('border-color','#777');
>         });
>
> Please help, i'm a bit of a jQuery newb.
>
> Thanks!

Reply via email to