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?
I don’t think
datais a valid HTML attribute. Did you mean to use the jQuerydata()function?Update for 9/2014 — This question and answer is over five years old now, and isn’t really relevant any more.
datais now a valid attribute. I’m leaving my original answer for historical purposes though.