tags:

views:

407

answers:

1

Hi

Works perfectly in FF (as you'd expect) but for some reason when I do this:

$('#objectname').attr('data', 'newcontent.php')

...absolutely nothing happens in IE.

When I do an

alert($('#objectname').attr('data', 'newcontent.php'))

it shows the new data source but doesn't change it...

Any ideas please?

+1  A: 

I don't think data is a valid HTML attribute. Did you mean to use the jQuery data() function?

$('#objectname').data('name','value');
swilliams