I'm trying at this:
var cur_border = $('id_grid_pic_'+cur_id).attr('border');
alert(cur_border);
But the alert sends back "object". I am wanting to get the value of the border=1 attribute of an image.
I'm trying at this:
var cur_border = $('id_grid_pic_'+cur_id).attr('border');
alert(cur_border);
But the alert sends back "object". I am wanting to get the value of the border=1 attribute of an image.
attr
returns HTML attributes. Since you're after the css value, you should replace attr
with css
:
var cur_border = $('id_grid_pic_'+cur_id).css('border');
alert(cur_border);
Try this
var cur_border = $('#id_grid_pic_'+cur_id).attr('border');
alert(cur_border);
If you are using an id selector then there should be a #
in front of the id.