Soldato
- Joined
- 12 May 2007
- Posts
- 3,896
- Location
- Bristol
Hopefully someone better with this than I am will be able to help here.
Just pulling variables from an xml sheet and doing some simple animations. All works fine except in IE6 and IE7 where notthing happens. Anyone have any ideas as to what I've done wrong?
and my xml follows this same pattern for each day of the week.
Just pulling variables from an xml sheet and doing some simple animations. All works fine except in IE6 and IE7 where notthing happens. Anyone have any ideas as to what I've done wrong?
Code:
$(document).ready(function(){
$.ajax({
type: "GET",
url: "data.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('data > *').each(function(){
var d = "."+this.nodeName;
var top = $(this).find('positiontop').text();
var opac = $(this).find('opacity').text();
var dur = $(this).find('duration').text();
var wid = $(this).find('size').text();
var color = $(this).find('image').text();
$( d +" .bubble").prepend('<img src="media/images/testbubble-' + color + '.png" alt="" class="bubble1" />');
$( d +" img.bubble1").animate({ "top": top,"opacity": opac, "width": wid, }, dur );
$( d +" img.bubble2").animate({ "top": top,"opacity": 0, "width": wid, }, dur );
});
}
});
});
and my xml follows this same pattern for each day of the week.
Code:
<data>
<mon>
<positiontop>180</positiontop>
<opacity>.5</opacity>
<duration>2500</duration>
<size>92px</size>
<image>sun</image>
</mon>
<tue>
<positiontop>120</positiontop>
<opacity>0.8</opacity>
<duration>2500</duration>
<size>25px</size>
<image>sat</image>
</tue>
Last edited: